We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

# CS201 Online Quiz#01 Fall 2013 Start Date: 18-11-2013 End Date: 19-11-2013

Quiz No. 1 Dated: Nov 11, 13

Dear Student,

Quiz No. 1 of CS201 will be started from Monday, November 18, 2013 and ends at Tuesday, November 19, 2013.
Quiz No. 1 will cover 1-6 lectures. There will be 10 questions in the quiz.

Note down that no alternate or offline will be provided if you missed the QUIZ, so try to attempt QUIZ at your earliest.

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

Views: 1234

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

### Replies to This Discussion

Please all students related this subject Share your online Quizzes here to help each other.thanks

Please share the question and their answers of this quiz if anyone has done.
Thanks.

# CS201 -  Quiz#1

Solved n shared by vuZs Team(Aniqa MAlik)

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
' '

[]

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-()

1. in while loop, loop counter initialize at______

2. <and> are both______operator

3. loop are ____structure

4. which operator has highiest presedense +,-,*,/

5. a variable in charactrister data type contain______bytes in memory.

6. the result of 4%3 is.

previous solved quizzes

1 - Application Softwares are use to

1. Type letters

2. Control computer hardware

3. Solve end user problems

4. Develop Graphics

Correct Choice : 3 From Lecture # 2

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 : 4 From Lecture # 2

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

1. Debugger

4. Editor

Correct Choice : 1 From Lecture # 2

4 - _______are part of system software

3. Drivers

4. None of the Given

Correct Choice : 1 From Lecture # 2

5 - The remainder (%) operator is,

1. An arithmetic operator

2. A logical operator

3. A relational operator

4. A division operator

Correct Choice : 1 From Lecture # 3

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

1. 22

2. 26

3. 46

4. 50

Correct Choice : 2 From Lecture # 3

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

4. Programs do not return a value.

Correct Choice : 3 From Lecture # 3

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

1. start()

2. system()

3. main()

4. program()

Correct Choice : 3 From Lecture # 3

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

1. { }

2. - > and < -

3. BEGIN and END

4. ( and )

Correct Choice : 1 From Lecture # 3

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

1. (dot)

2. (semi-colon)

3. (colon)

4. (single quote)

Correct Choice : 2 From Lecture # 3

11 - Which of the following is a correct comment?

2. ** Comment **

3. /* Comment */

4. { Comment }

Correct Choice : 3 From Lecture # 3

12 - Which of the following is not a correct variable type?

1. float

2. real

3. int

4. double

Correct Choice : 2 From Lecture # 3

13 - Which of the following is the correct operator to compare two variables?

1. :=

2. =

3. equal

4. ==

Correct Choice : 4 From Lecture # 3

14 - Identify the correct statement

1. Programmer can use comments to include short explanations within the source

code itself.

2. All lines beginning with two slash signs are considered comments.

3. Comments very important effect on the behavior of the program

4. both

Correct Choice : 2 From Lecture # 3

15 - There is a unique function in C++ program by where all C++ programs start their

execution

1. Start()

2. Begin()

3. Main()

4. Output()

Correct Choice : 3 From Lecture # 3

16 - Every statement in C++ program should end with

1. A full stop (.)

2. A Comma (,)

3. A Semicolon (;}

4. A colon (:)

Correct Choice : 3 From Lecture # 3

17 - A variable is/are

1. String that varies during program execution

2. A portion of memory to store a value

3. Those numbers that are frequently required in programs

4. None of these

Correct Choice : 3 From Lecture # 3

18 - The value of 2*15/3*7+3*2 is

1. 146

2. 76

3. 8

4. 70

Correct Choice : 2 From Lecture # 3

19 - The size of a double variable is

1. 2 bytes

2. 4 bytes

3. 8 bytes

4. 10 bytes

Correct Choice : 3 From Lecture # 3

20 - Which of the following are NOT relational operators ?

1. >

2. /p>

3. ==

4. >=

Correct Choice : 3 From Lecture # 3

21 - Which of the following can not be used as identifiers?

1. Letters

2. Digits

3. Underscores

4. Spaces

Correct Choice : 4 From Lecture # 4

22 - result of " number = number / 10; " will be equel to The " number = number % 10; "

1. TRUE

2. FALSE

3.

4.

Correct Choice : 2 From Lecture # 4

23 - int x,y =10; cout x endl; The value of the x will be in the above code

1. 0

2. 10

3. unknown Value

4. -1

Correct Choice : 3 From Lecture # 4

24 - In flow chart process is represented by

1. Rectangle

2. Arrow symbol

3. Oval

4. Circle

Correct Choice : 1 From Lecture # 5

25 - Which of the following is the boolean operator for logical-and?

1. &

2. &&

3. |

4. |&

Correct Choice : 2 From Lecture # 5

26 - Evaluate !(1 && !(0 || 1)).

1. TRUE

2. FALSE

3. Unevaluatable

4. None Of The Above

Correct Choice : 1 From Lecture # 5

27 - Which one of the following operators is a unary operator?

1. OR ( || )

2. AND ( && )

3. XOR ( ^ )

4. Logical NOT ( ! )

Correct Choice : 4 From Lecture # 5

28 - Which of the following shows the correct syntax for an if statement?

1. if expression

2. if{ expression

3. if( expression)

4. expression if

Correct Choice : 3 From Lecture # 5

29 - In if structure the block of statements is executed only,

1. Type letters

2. When it contain arithmetic operators

3. When it contain logical operators

4. When the condition is true

Correct Choice : 4 From Lecture # 6

30 - Loader transfers the executable code from main memory to hard disk.

1. TRUE

2. FALSE

3.

4.

Correct Choice : 2 From Lecture # 6

31 - What is the final value of x when the code int x; for(x=0; x < 10; x++) {} is run?

1. 10

2. 9

3. 0

4. 8

Correct Choice : 1 From Lecture # 6

32 - When does the code block following while(x< 100) execute?

1. When x is less than one hundred

2. When x is greater than one hundred

3. When x is equal to one hundred

4. While it wishes

Correct Choice : 2 From Lecture # 6

33 - Which is not a loop structure?

1. For

2. Do while

3. While

4. Repeat Until

Correct Choice : 4 From Lecture # 6

34 - for (int n=10; n >0; n++) { cout n ", "; } How many Time Loop will run

1. 100

2. Infinite Time

3. 1000

4. 10000000

Correct Choice : 2 From Lecture # 6

35 - When break statement is encountered in switch statement, it

1. Stops the entire program

2. Stops the execution of current statement

3. Exits from switch statement

4. None of the given options

Correct Choice : 3 From Lecture # 7

36 - A for loop usually consist of __________ expressions.

1. 1

2. 3

3. 2

4. 4

Correct Choice : 3 From Lecture # 7

37 - How many times is a do while loop guaranteed to loop?

1. 0

2. Variable

3. Infinitely

4. 1

Correct Choice : 4 From Lecture # 7

38 - x = x + 4 ; Is Equal to

1. x += 4 ;

2. x =+ 4 ;

3. x == 4 ;

4. x =! 4 ;

Correct Choice : 1 From Lecture # 7

39 - The first expression in a for loop is

1. The test expression.

2. The step value of the loop.

3. The first value of our counter variable.

4. None of the above.

Correct Choice : 3 From Lecture # 7

40 - What is the break statement used for ?

1. To quit the program.

2. To quit the current iteration.

3. To stop the current iteration and begin the next iteration.

4. None of the above.

Right option:  Before

Right option:   && cannot be used with if condition (not sure)

IT 1st) 15 minutes ago

Right option: 1

right option: char

CS201  Introduction to Programming Today Solve Online Quiz No. 01 Fall 2013

find attachment

Attachments:

right options for above Attachment File

Right options :

1-      When both exp 1 and exp 2 are false

2-      0 – 32768

3-      Remainder

4-      Program

7-      Transfers to its definition

8-      Return

9-      One time

## Latest Activity

Repanzal added a discussion to the group CS615 Software Project Management

### CS615 gdb

1 hour ago
Repanzal joined +M.Tariq Malik's group

### CS615 Software Project Management

1 hour ago
Repanzal posted a status
"CS615 GDB solution plzz..."
1 hour ago
Munna Bhai MBBS posted discussions
1 hour ago
maheen mahan posted a discussion

### mth603 asdignment no 2 spring2020 solution file

3 hours ago
4 hours ago
4 hours ago
Mani Siddiqui BS VIII posted a status
"میرا بہت دل چاہتا ہے کہ اک پل کے لیے سہی میں ہر رات سونے سے پہلے تمھاری آواز سنوں ♥ #Mani"
5 hours ago
Mani Siddiqui BS VIII posted a status
"سرد لہجوں کے برف زاروں پر . . . . منجمند ھیں تمام تر سوچیں!"
5 hours ago
Mani Siddiqui BS VIII posted a discussion

### خراب ریاضی

5 hours ago
Silent Boy, Sofia_Khan, Sheikhhaleema and 1 more joined Virtual University of Pakistan
5 hours ago
Mani Siddiqui BS VIII posted a status
"کبھی جو یاد آؤں اُداسی میں پُرانے میسج پڑھ لینا میرے پاس بھی بس یہی سہولت ہے"
6 hours ago

1

2

3