Important Questions

CBSE Guess > Papers > Important Questions > Class XII > 2010 > Computer Science > Computer Science By Ravi Kiran

CBSE CLASS XII

1. (a) Default Constructor: It is type of constructor, which does not have any
parameter.
Default Constructor: It is the pre-defined constructor. Copy Constructor: It is an overloaded constructor in which object of the same class is passed as parameter.
Copy Constructor: It is a constructor, which is used to copy content of one object to another of the same class.
class STUDENT
{
int Rno;
char Name[20];
public:
STUDENT(); //Default Constructor
STUDENT(STUDENT &S); //Copy Constructor

(b) (i) stdio.h
(ii) ctype.h

(c) #include <iostream.h>
const int Dividor=5;
void main()
{
int Number = 15;
for (int Count = 1;Count<=5;Count++,Number-=3)
if (Number%Dividor==0)
{
cout<<Number/Dividor; OR
cout<<endl; cout<<Number/Dividor<<endl;
}
else
cout<<Number+Dividor<<endl;
}

(d) 101×150×50
101×152×50
101×202×49

Note:
Deduct ½ mark for not considering endl from the total marks obtained in this question, Deduct ½ mark for not mentioning ‘X’ in between the numbers.

(e) 3116*tESTS*AHEAD
DAEHA*SSTEt*6113

Note:
Deduct ½ mark for not considering endl from the total marks obtained in this question. Deduct ½ mark for not mentioning ‘*’ in between the numbers.

(f) (ii) 1 2 3 4 5 6 7 8 9 10 11 The minimum value Rndnum will take is 7

2. (a) Data Encapsulation: Wrapping up of data and functions together in a single unit is known as Data Encapsulation.

Example:
class Item //Class wraps Data & Functions together in a single unit
{
int Ino;
char Desc[20];
public:
void Purchase();
void Sale();
};

Paper By Mr. Ravi Kiran
Email Id : [email protected]