View more random threads:
- CS201 Midterm Paper May 2010
- ACC501 Current Quizzes Solved 31 July 2010
- MGT402 Online Quiz No 02 Solution & Discussion Last Date...
- CS001 -Computer Proficiency License Online Quiz No. 1...
- HRM628 Midterm Paper 2010
- MTH302 Business Mathematics & Statistics 22 november, fall...
- MGMT623 (alt. Code HRM623) 26 May 2010
- MGT502 online quiz fall 2010
- help me plzzzz
- NTS Past Papers NTS For 2014-2015 Preparation Test
CS201-Introduction to Programming Quiz No.1 Solutions and Discussions
Question # 1 of 10 Total Marks: 1
< and > both are _________ operators.
Arithmetic
Relational
LogicalPG 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,valuePG154, 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
' '
[]
Sponsored Links
Right Options:
1-Logical
2-Assignment operator should not be used for Comparison
3-5
4-Reference,value
5-Outside
6-Break
7-Compulsory
8-17
9-2
10-()
There are currently 1 users browsing this thread. (0 members and 1 guests)