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_7b.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_7b.php on line 18

Important Questions

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

CBSE CLASS XII

Ans:

(iv)51#50#
(Solution: MAX value is 3 That’s why random(MAX) can produce 0 or 1 or 2. (random(N) will produce no. between 1 to n-1)
The Number value may be 50 or 51 or 52.
The P value starts from Number, upto 50, each time decreases by 1.
So Possible outputs are as follows:
52#51#50#
51#50#
50#
As the output 51#50# is available in given answers, so 51#50# is the answer.)

2008 Delhi

Q.1.b. Name the header files that shall be needed for the following code: 1
void main( )
{ char String[ ] = “Peace”;
cout << setw(2)<<String;
}

Ans:

iomanip.h, iostream.h

Q.1. c. Rewrite the following program after removing the syntactical error(s) if any.
Underline each correction.
#include<iostream.h>
void main( )
{ First = 10, Second = 20;
Jumpto(First;Second);
Jumpto(Second);
}
void Jumpto(int N1, int N2 = 20)
{ N1=N1+N2;
count<<N1>>N2;
}

Ans:

#include<iostream.h>
void Jumpto(int N1,int N2=20);
//Prototype missing
void main( )
{ int First = 10, Second = 20;
//Data type missing
Jumpto(First,Second);
//Comma to come instead of ;
Jumpto(Second);
}
void Jumpto(int N1, int N2)
{ N1=N1+N2;
cout<<N1<<N2;
//Output operator << required
}

Paper By Mr. Ravi Kiran
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_7b.php on line 99

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_7b.php on line 99