Trending ▼   ResFinder  

CBSE Class 12 Pre Board 2019 : Computer Science (St Xavier's Sr. Sec. School, Delhi)

7 pages, 61 questions, 0 questions with responses, 0 total responses,    0    0
CBSE 12 Pre Boards
  
+Fave Message
 Home > cbse12_pre_boards >   F Also featured on: School Page cbse12

Formatting page ...

ST. XAVIER S SR. SEC. SCHOOL, DELHI-110054 Std.12 03-01-2019Pre Board Exam in Computer Science 1. a) Time: 3 hrs. M. Marks: 70 Rewrite the following program after removing syntax error(s) if any in the following program segment. [2] void main( ) int A[10]; A=[39,-45]; for( p = 0; p<=6; p++) { if(A[p]%2=0) int S = S+A[p];} cout<<S;} b) Write the output of the following program segment (assume all necessary header files are included) [2] void func(char s[]) { for (int i=0;s[i]!='\0';i++) { if(((i%2)!=0) &&(s[i]!=s[i+1])) { s[i]='@'; } else if (s[i]==s[i+1]) { s[i+1]='!'; i++; } }} void main() { char s[]="ACCESS"; cout<< Original String <<s; func(s); cout<<"Changed String"<<s; } c) Find out the output of the following program segment [3] void main( ) { intAr[ ] = { 6 , 3 , 8 , 10 , 4 , 6 , 7} ; int *Ptr = Ar , I ; cout<<++*Ptr<< '@' ; I = Ar[3] - Ar[2] ; cout<<++*(Ptr+I)<<'@'<<"\n" ; cout<<++I + *Ptr++ << '@' ; cout<<*Ptr++ <<'@'<< '\n' ; for( ; I >=0 ; I -=2) cout<<Ar[I] << '@' ; } d) Observe the following program and find out, which output(s) out of (i) to (iv) willbe expected from the program? What will be the minimum and the maximum value assigned to the variable Alter? [2] Note: Assume all required header files are already being included in the program. void main( ) { randomize(); intAB[]={10,7}, NO; int A=random(2) + 10 ; for (int C=0;C<2;C++) { NO=random(2) ; cout<<AB[N] +A<< # ; } } (i) 21#20# (ii) 20#18# (iii) 20#17# (iv) 21#17# e) Observe the following program very carefully and write the name of those header file(s), which are essentially needed to compile and execute the following program successfully: [1] void main() { char text[20], newText[20]; gets(text); strcpy(newText,text); for(inti=0;i<strlen(text);i++) if(text[i] = = A )

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 


Tags : cbse pre boards, prelims 2015 - 2016, preliminary examinations, central board of secondary education, india schools, free question paper with answers, twelfth standard, xiith std, board exams, mock, model, sample, specimen, past, free guess papers.india, delhi, outside delhi, foreign, cbse class xii, cbse 12, 12th standard, cbse papers, cbse sample papers, cbse books, portal for cbse india, cbse question bank, cbse question papers with answers, pre board exam papers, cbse model test papers, solved board question papers of cbse last year, previous years solved question papers, free online cbse solved question paper, cbse syllabus, india cbse board sample questions papers, last 10 years cbse questions papers, cbse important questions, specimen / mock papers.  

© 2010 - 2024 ResPaper. Terms of ServiceContact Us Advertise with us

 

cbse12_pre_boards chat