Important Questions

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

CBSE CLASS XII

Computer Science (Solved) 2008 Delhi:

Disable Pop up Blockers to View Solution

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

void main( )

{

char String[ ] = “Peace”;

cout << setw(2)<<String ;

}

Answer : Click Here

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

#include<iostream.h>

void main( )

{
First = 10, Second = 20;

Jumpto(First;Second);

Jumpto(Second);

}

void Jumpto(int N1, int N2 = 20)

{

N1=N1+N2;

count<<N1>>N2;

}

Answer : Click Here


Q. 3. Find the output of the following program; 

#include<iostream.h>

#include<ctype.h>

void main( )

{

char Text[ ] = “Mind@work!”;

for(int I=0; Text[I]!=’\0’;I++)

{

if(!isalpha(Text[I]))

Text[I]=’*’;

else if(isupper(Text[I]))

Text[I]=Text[I]+1;

else

Text[I] = Text[I+1];

}

cout<<Text;

}

Answer : Click Here


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

#include<iostream.h>

void main( )

{

int U=10,V=20;

for(int I=1;I<=2;I++)

{

cout<<”[1]”<<U++<<”&”<<V – 5 <<endl;

cout<<”[2]”<<++V<<”&”<<U + 2 <<endl;

}

}

Answer : Click Here


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

#include<stdlib.h>

#include<iostream.h>

void main( )

{

randomize( );

char City[ ][10]={“DEL”,”CHN”,”KOL”,”BOM”,”BNG”};

int Fly;

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

{

Fly=random(2) + 1;

cout<<City[Fly]<<”:”;

}

}

Outputs:

  1. DEL : CHN : KOL:
  2. CHN: KOL : CHN:
  3. KOL : BOM : BNG:
  4. KOL : CHN : KOL:

Answer : Click Here

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