www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# CS 201 QUIZ NUMBER 01 OPENING DATE 24-11-14 CLOSE DATE 25-11-14

CS 201 QUIZ NUMBER 01 OPENING DATE 24011-14  CLOSE DATE 25-11-14

Views: 3767

### Replies to This Discussion

CS201- Introduction to Programming Solved Quiz No. 1 Fall 2014

Question # 1 of 10           Total Marks: 1
< and > both are _________ operators.
Arithmetic
Relational
Logical   = Correct Choice
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  = Correct Choice
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  = Correct Choice
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   = Correct Choice
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  = Correct Choice
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  = Correct Choice
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  = Correct Choice
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  = Correct Choice
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  = Correct Choice
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
' '
[]  = Correct Choice

1 - Application Softwares are use to

1. Type letters

2. Control computer hardware

3. Solve end user problems   = Correct Choice

4. Develop Graphics

2 - Computer can do,

1. More than what we tell it

2. Less then what we tell it

3. Like human being

4. Exactly what we tell it  = Correct Choice

3 - we can control our program while it is running by using

1. Debugger  = Correct Choice

4. Editor

4 - _______are part of system software

3. Drivers

4. None of the Given

5 - The remainder (%) operator is,

1. An arithmetic operator  = Correct Choice

2. A logical operator

3. A relational operator

4. A division operator

6 - int x = 2 * 3 + 4 * 5; What value will x contain in the sample code above?

1. 22

2. 26  = Correct Choice

3. 46

4. 50

7 - What is the correct value to return to the operating system upon the successful

completion of a program?

1. -1

2. 1

3. 0  = Correct Choice

4. Programs do not return a value.

8 - What is the only function all C++ programs must contain?

1. start()

2. system()

3. main()  = Correct Choice

4. program()

9 - What punctuation is used to signal the beginning and end of code blocks?

1. { }  = Correct Choice

2. - > and < -

3. BEGIN and END

4. ( and )

10 - What punctuation ends most lines of C++ code?

1. (dot)

2. (semi-colon)  = Correct Choice

3. (colon)

4. (single quote)

1

2

3

4

5

## VIP Member Badge & Others

------------------------------------

## Latest Activity

+Ðêå†h†å§†ï¢+ and Mr Siren Head are now friends
20 minutes ago
Elegant left a comment for Aleena Malik
1 hour ago
Elegant liked Aleena Malik's profile
1 hour ago
2 hours ago
Zain Arshad added 3 discussions to the group CS304 Object Oriented Programming
2 hours ago
Ziddi Queen and Arsal are now friends
2 hours ago
usama khan posted a blog post

### Helen Schifter on Wellness

2 hours ago
Arsal posted a photo

2 hours ago