Beruflich Dokumente
Kultur Dokumente
CLASS XI(2015-16)
(1)
(2)
(3)
(4)
(5)
(6) Write the first line of the function declaration and the function defination for each of the
statement :(a)
(b)
(c)
(d)
(e)
(f)
(7)WAP to find the root of quadratic ax2 +bx+c=0 for a given number a, b, c using function.
(8) WAP to find the HCF of the given two positive intger using function that return an
interger quantity.
(9) WAP using function to input the temperature in Fahrenheit and pint its Centigrade
equivalent . Let the function receive the temperature in Fahrenheit as argument and return
type the converted temperatue.
(10) WAP using function to input a number and print whether it is odd or even . The number
has to be sent to a function as argument whereas the function should return O if odd else
return E.
(11) WAP using function to input three line an print whether they can make triangle or not , if
yes return Y else return N. if yes then pass argument to function and find the area of
triangle using Herons formula.
(12) Find the output of the following:(1)
#include<iostream.h>
static int i=50;
{
static int i=3;
cout<<\n<< i ; i= i +4;
cout<<\n<<::i;
function( )
cout <<\n<<I;
cout<<\n<<::I;
}
(2)
#include<iostream.h>
void play(int a , int & b)
{
a+ =b++;
int t = a+b;
cout<<\n<<t<<\t<<a<<\t<<b;
}
void main()
{
int a = 190;
int b =40;
if (a/b >2)
play(a,b)
cout<<\n<<a<<\t<<b;
}
(3)
#include<iostream.h>
void fun(int a, int & b , int c=62)
{
a=b+c; b=a+c; c= a+b;
cout<<a<<b<<c;
}
void main()
{
int x=55; int y=6;
cout<<endl;
fun(x,x);
cout<<x<<y<<endl;
fun(x,y,y);
cout<<endl;
cout<<x<<y;
}
(4)
#include<iostream.h>
float fun(float f, int &a , float b =5.56)
{
if (++f+b>69.7)
a+ 100;
else
a+100;
b++;
cout<<a<<b<<f<<endl;
return f-b;
}
void main()
{
int x=90;float f1=9.96;
cout<<fun(f1, x, 50.5);
cout<<x<<f1<<endl;
cout<<fun(f1,x, f1);
cout<<x<<f1<<endl;
}