Thursday, 8 November 2012

||| VuHelp4U ||| Today's CS201 Solved Quiz

Question # 1 of 10           Total Marks: 1
< and > both are _________ operators.
Arithmetic
Relational
Logical PG 258
Mathematical

Question # 2 of 10           Total Marks: 1
Find out the logical error in following lines of code. If (x = 10) cout << "x is 10";
10 should be enclosed in quotations
There is no semicolon at the end of if condition
Assignment operator should not be used for comparison
Variable x should not be inside parenthesis

Question # 3 of 10           Total Marks: 1
What will be the result of the expression j = i++; if initially j = 0 and i = 5?
0
5
6
4

Question # 4 of 10           Total Marks: 1
Default mechanism of calling a function by passing it array is call by ________ and in case of passing variable is call by ________.
Reference, Reference
Reference, value PG154, 119
Value, Reference
Value, Value

Question # 5 of 10           Total Marks: 1
When the break statement is encountered in a loop's body, it transfers the control ________from the current loop.
Inside
Outside
To break statement
To continue statement

Question # 6 of 10           Total Marks: 1
________statement is used to terminate the processing of a particular case and exit from switch structure.
If
Goto
Break
Continue

Question # 7 of 10      Total Marks: 1 
When the if statement consists of more than one statement then enclosing these statement in braces is _________. 
 Compulsory
 Optional
 Not required
 Relevant

Question # 8 of 10    Total Marks: 1 
What will be the value of the variable output in the given piece of code? double output = 0; output = (2 + 2) * 4 + 2 / (4 – 2); 
15
 17
 12
 1

Question # 9 of 10   Total Marks: 1 
If we assign 2.06721 to an integer variable x, what will be the output if we print x using cout<< statement? 
2
2.1
2.06
2.07

Question # 10 of 10      Total Marks: 1 
__________ will be used for clarity and to force the order of evaluation in an expression. 
 " "
 () PG32
 ' '
 []

 



     


--
To post to this group, send email to vuhelp_pk@googlegroups.com
To unsubscribe from this group, send email to vuhelp_pk+unsubscribe@googlegroups.com
 
 
Group Rules Vuhelp4u
Sharing of Video songs links, movies links, dramas links are not allowed in study group. Only Islamic and general information Video links allowed.
SPAM, Advertisement, and Adult messages are NOT allowed and that member will be behaved strictly.
http://groups.google.com/group/vuhelp_pk?hl=en_US

No comments:

Post a Comment