You are on page 1of 9
DELHI PUBLIC SCHOOL MANDLA ROAD JABALPUR SESSION: 2018-19 CLASS XII PRE BOARD -II EXAMINATION SUB: COMPUTER SCIENCE (SUB CODE: 083) MM: 70 ( TIME: 3Hrs 1, All questions are compulsory. 2. Programming Language: C++ 3. Please check that this question paper contains 9 printed pages. 4. Please check that this question paper contains 7 questions. Qu @, Define Macro in C++ with suitable example. ow (@)) Ansk typed the following C++ code and during compilation he found four errors as follows: ( @ Function strlen should have a prototype i) Undefined symbol cout Gi) Undefined symbol endl @) Function getchar should have a prototype~ On asking his teacher told him to include necessary header files in the code. Write the names of the header files, which Ansh needs to include, for successful compilation and execution of the following code : voidmain() if char S{] = "Hello"; for(int i = 0; i void main( ) ( int Af10]; A=B2,54,7.9,10]; fort <=6; ptt) { if(A[p]%2=0) int S= S+A[p]; Q, } cout< Gvyind Mina S void repch(char s[]) : t , 120 F of Lig for (int i-0;s{i}!=\0'i++) \s0, MOF a peu if((G%2)!=0) &&(sfi}!=sfi+1)) sel yr Met by, dt $27 ( . nn sliF@s hey, aed An es) ancl else if (S[i]=sfi+1]) — 4a Hi yee, BeeleeT. 4 ; sit \ {; ee void main() Qa rics char str{]="SUCCESS", cout<<"Original String” < ee en oe ° 3 void switchover(int Af ],int N, int split Lo Ao S00 16) { for(int K = 0; K : WG for(int K = 0; K (A) ebie 3 WE Dag Trots2s 6% 3 Oy. Prob ay co

You might also like