CS201 Quiz 1 Solved 2021 - Introduction to Programming Solved Quiz

 

CS201 Quiz 1 Solved 2021

CS201 Quiz 1 Solved Answer 2021 - Introduction to Programming Solved Quiz Solution with key references with handouts books.

CS201 SOLVED QUIZ 1 2021

An effort by (VUANSWER)


Question # 1


< and > both are _________ operators.


Arithmetic
Relational
Logical 
Mathematical

Question # 2 


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

 
What will be the result of the expression

j = i++; if initially j = 0 and i = 5?


0
5
6
4


Question # 4 


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  

Value, Reference
Value, Value


Question # 5 

          
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


________statement is used to terminate the

processing of a particular case and exit

from switch structure.


If
Goto
Break
Continue

Question # 7


If we pass more than one arguments to a

function then they are separated by____.


Comma, Lecture 9

Semicolon; 

Colon:

Brackets ()

OUR WHATSAPP GROUP JOIN



Question # 8 


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 


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 


__________ will be used for clarity and to force

the order of evaluation in an expression. 
 " "
() PG32
 ' '
 [ ]  

 

Question # 11 


What will be the size of following array? int arr[29];


0

30 PAGE 105-106

29

28


CLICK TO VIEW ENG101 QUIZ 1 2021 WITH ANSWER


Question # 12


If a function has not been declared before

its definition, It is logical error

syntax error LECTURE NO 9
logical Error
run time error
none of these


Question # 13


When the break statement is encountered in

a loop‟s body, it transfers the control from

the current loop.


Inside 

Outside By using break the loop will terminate.

To break statement 

To continue statement


Question # 14


When we access a multidimensional array,

each array index is surrounded by_.


Single quotes ' ' 

Double quotes " " 

Brackets[] Lecture 11

None of the given


Question # 15


char name [] = “Hello World” ; In the above

statement, a memory of ____characters

will be allocated


12 Lecture 12

10

11

13


Question # 16


A variable declared within a code block becomes

variable for that block.

Static

Integer

Local Lecture 9

Global

Question # 17


When the, if statement consists of more than

one statement then enclosing these statement

in braces, is _________. 


Compulsory 
Optional
Not required
Relevant




Question # 18


Characters of a string stored in an array

can be accessed directly using array.


Manipulation

Superscript

Subscript Page No 123

Postscript


Question # 19


A variable declared within a code block

becomes variable for that block.

Static

Integer

Local Lecture 9

Global


Question # 20


The data type before a function name

represents its,


Return Type

Function data 

Function arguments

Function name


Question # 21


From following; which one is the correct syntax

of an array initialize: Array size is 10 and it is of

double data type to value 0?


arr[10] = {0.0};

double arr[10]= 0.0;

Double arr[10] = {0.0}; Lecture 12 

double arr[] = 0.0;


Question # 22


In C/C++, by default arguments are passed

by__to a function.


Value Lecture 9

Reference 

Prototype

None of the given


Question # 23


By default, the starting index of an array in C++ is

0 Lecture 11

2

1

-1

Share with your friends get easy to preparation for quiz

Post a Comment

0 Comments