Professional Documents
Culture Documents
CLASS : XI
TIME 3 hrs
M.M: 70
d)
e)
f)
b)
c)
b)
c)
g)
2 a)
d)
e)
3 a)
b)
display ?
#include<iostream.h>
#include<stdlib.h>
void main()
{
int N, Guessme;
randomize();
cin>>N;
Guessme = random(N-10) + 10 ;
cout<<Guessme<<endl;
}
Name the header files required to execute the following program
segment
void main()
{
int n;
cout<<"Enter a number";
cin>>n;
if(n==0)
exit(0);
cout<<"Square of n is "<<setw(5)<<pow(n,2);
}
Differentiate between the
(2 * 4) =
following
iii) !
&&
i)
::
?:
ii) extern automatic
iv) break continue
for(int i=0;j=15;i<5;i++;j--)
{
if(i%3==0)
cout<<i<<" & "<<j<<endl;
}
c)
d)
Rewrite the below code after removing the syntax error. Underline
the corrections made and state the error(s). (Header files assumed
to be included)
Void main
{
int i=15 ; j=30 ;
if( i + j % 2 ) ;
cout<<"sum is "i+j;
getch()
}
e)
f)
4 a)
b)
cout<<endl;
for(i=0;i<6;i++)
if(arr[i]%2)
arr[i]++;
for(i=-;i<6;i++)
cout<<arr[i]<<" ";
c)
d)
e)
f)
5 a)
b)
}
Draw a flowchart to find whether the given dimensions (a , b) form
a square of rectangle.
Explain the use of connector in a flowchart. Illustrate with an
example
Write a program to compute area of triangle. Sides (a,b,c) are input
by user.
Area = sqrt(s*(s-a)*(s-b)*(s-c))
where
s=(a+b+c)/2.
What is the difference type conversion and type casting? Illustrate
with the help of suitable example
3
2
4
3