Saturday 20th April 2024
REGISTRATION
Online Fashion Store

Important Questions

CBSE Guess > Papers > Important Questions > Class XII > 2009 > Computer Science > Computer Science By Mr. Mr. M. R. K

CBSE CLASS XII

Computer Science (Solved) 2008 Outside Delhi Delhi:

Disable Pop up Blockers to View Solution

Q. 6. Name the header files that shall be needed for the following code:

void main( )

{

char word[]=”Exam”;

cout<<setw(20)<<word;

}

Answer : Click Here


Q. 7. Rewrite the following program after removing the syntax error(s) if any. Underline each correction.

#include<iostream.h>

void main( )

{

One=10,Two=20;

Callme(One;Two);

Callme(Two);

}

void Callme(int Arg1,int Arg2)

{

Arg1=Arg1+Arg2;

Count<<Arg1>>Arg2;

}

Answer : Click Here

Q. 8. Find the output of the following program:

#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;

}

Answer : Click Here

Q. 9. Find the output of the following program:

#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;

}
}

Answer : Click Here

Q. 10. In the following program, find the correct possible output(s) from the options:

#include<stdlib.h>

#include<iostream.h>

void main( )

{

randomize( );

char Area[ ][10]={“NORTH”,”SOUTH”,”EAST”,”WEST”};

int ToGo;

for(int I=0; I<3;I++)

{

ToGo=random(2) + 1;

cout<<Area[ToGo]<<”:”;

}

}

Outputs:

(i) SOUTH : EAST : SOUTH :

(ii) NORTH : SOUTH : EAST :

(iii) SOUTH : EAST : WEST :

(iv) SOUTH : EAST : EAST :

Answer : Click Here

Paper By Mr. MRK
Email Id - [email protected]