Warning: include_once(../../../../../headder.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/papers/cbse_important_questions/xii/2010/computer_science/computer_science_1b.php on line 18

Warning: include_once(): Failed opening '../../../../../headder.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/papers/cbse_important_questions/xii/2010/computer_science/computer_science_1b.php on line 18

Important Questions

CBSE Guess > Papers > Important Questions > Class XII > 2010 > Computer Science > Computer Science By Naveen Gupta

CBSE CLASS XII

(c). Difference between Structured programming language and Object Oriented Programming Language.

(d).. How the copy constructor is different from parameterized constructor? Explain with help of example.

e. Define the terms class and object?

f. class cat
{
public:
cat(int initialAge)
{
itsAge=initialAge;
}
~cat()
{
}
int getAge()
{
return itsAge;
}
void setAge(int Age)
{
itsAge=Age;
}
void Meow()
{
cout<< “Meow\n”;
}
private:
int itsAge;
}
void main()
{
cat Friskey(5);
_____________ //Statement 1
cout<< “Friskey is a cat who is”;
cout<<_______________ << “years old\n”; //Statement 2
______________ //Statement 3
Friskey.setAge(7);
cout<< “\n Now Friskey is”;
cout<<______________ << “years old\n”; //Statement 4
}
Observe the program given above carefully and fill the blanks marked as Statement 1, Statement 2, Statement 3 and Statement 4 to produce the following output:
Meow
Friskey is a cat who is 5 years old
Meow
Now Friskey is 7 years old

Paper By Mr. Naveen Gupta
Email Id : [email protected]


Warning: include(../../../../../120_60_others.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/papers/cbse_important_questions/xii/2010/computer_science/computer_science_1b.php on line 91

Warning: include(): Failed opening '../../../../../120_60_others.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/papers/cbse_important_questions/xii/2010/computer_science/computer_science_1b.php on line 91