CBSE Guess > Papers > Important Questions > Class XII > 2010 > Computer Science > Computer Science By Ravi Kiran
CBSE CLASS XII
Ans:
void Callme(int Arg1,int Arg2=20);
#include<iostream.h>
void main( )
{ int One=10,Two=20;
Callme(One,Two); //Given ; instead of ,
Callme(Two);
}
void Callme(int Arg1,int Arg2)
{ Arg1=Arg1+Arg2;
cout<<Arg1<<Arg2;
}
1.d.Find the output of the following program:3
#include<iostream.h>
#include<ctype.h>
void main( )
{ char Mystring[ ] ="what@OUTPUT!";
for(int I=0; Mystring[I]!='\0';I++)
{ if(!isalpha(Mystring[I]))
Mystring[I]='*';
else if(isupper(Mystring[I]))
Mystring[I]=Mystring[I]+1;
else
Mystring[I] =Mystring[I+1];
}
cout<<Mystring;}
Ans:
Output:hat@*PVUQVU*
e. Find the output of the following program: 2
#include<iostream.h>
void main( )
{ int A=5,B=10;
for(int I=1;I<=2;I++)
{ cout<<”Line1”<<A++<<”&”<<B-2 <<endl;
cout<<”Line2”<<++B<<”&”<<A +3 <<endl;
}
}
Ans:
Output:
Line15&8
Line211&9
Line16&9
Line212&10
Paper By Mr. Ravi Kiran
Email Id : [email protected] |