Delhi Public School, R



KENDRIYA VIDYALAYA NEW CANTT I SHIFT ALLAHABAD

COMPUTER SCIENCE (THEORY)

I PRE BOARD 2017-18

TIME - 3 HRS CLASS XII M. Marks 70

GENERAL INSTRUCTIONS:

1. ALL QUESTIONS ARE COMPULSORY.

2. PROGRAMMING LANGUAGE : C++

Q1. Answer the following questions:

a) Name the header file(s) that shall be needed for successful compilation of the following C++ code.

void main( ) (1)

{ int n;

n=strlen(”AISSCE”);

coutthree;

}

c) Find the output of the following program: (3)

#include

#include

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 ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download