Download CBSE Computer Science Sample Paper Class XII (12th) 2009
Sample Paper – 2009 Class – XII COMPUTER SCIENCE Time:3HRS M.M 70 General Instruction: (i) All Questions are compulsory (ii) Programming Language : C++ Q1 a) Reusability of classes is one of the major properties of OOP. How it is implemented 2 b) Name the header file(s) required for the given built-in functions of C++ library 1 i) abc() ii)printf() c) Rewrite the given snippet after correcting the error(s) if any. Underline the each correction(s) 2 #include<iostream.h> class Employee { int no; class date { int dd,mm,yy; public: void print_date() { cout<<dd<<mm<<yy;} }; date DOB; public : date DOJ; void prin() { print_date(); cout<<DOB.dd<<DOB.mm<<DOB.yy; } }; void main() { Employee ob1; date ob2; } d) What will be the output of the following program 3 #include<iostream.h> void main() { static int arr[]={0,1,2,3,4}; int *p[] = { arr,arr+1,arr+2,arr+3,arr+4}; int **ptr=p; ptr++; cout<<ptr-p<<*ptr-arr<<**ptr<<endl; *ptr++; cout<<ptr-p<<*ptr-arr<<**ptr<<endl; *++ptr; cout<<ptr-p<<*ptr-arr<<**ptr<<endl; ++*ptr; cout<<ptr-p<<*ptr-arr<<**ptr<<endl; } (Set-1)
Download This Full Post
- Physics 2006
(487 downloads)