CS201-Introduction To Programming | Mid-Term Grand Quiz Fall 2021

 

MID-TERM GRAND QUIZ
 FALL 2020 (Paper 1)

Question No 1:
When we call (Raise For Success) a function , as control
  • transfers to its Prototype
  • transfers to its definition Correct
  • returns to statement following function call
  • The compiler stops execution of whole program

Question No 2:
If stream is (Raise For Success) used for ______.
  • Input the stream Correct
  • Output the stream
  • Input and output the stream
  • All of the given

Question No 3:
__________ function (Raise For Success) is used to find the number of characters in a string.
  • str()
  • str-len()
  • strlenght()
  • strlen() Correct


Question No 4:
Pointers are a (Raise For Success) special type of ______ in which a memory address is stored.
  • variables Correct
  • Location
  • Characters
  • None of the given

Question No 5:
Select the correct way (Raise For Success) to assign the address of first element of array to pointer?
  • int"ptr = &data(1);
  • int"ptr = &data;
  • int"ptr = data; Correct
  • int"ptr = data(0); 

Question No 6:
A hierarchy of classes (Raise For Success) which are used to deal with console and disk files are called _______.
  • Stream classes Correct
  • Simple classes
  • Binary classes
  • IO classes


Question No 7:
We can read, (Raise For Success) write and manipulate the same file using _____.
  • iostream.h
  • stdio.h
  • fstream.h Correct
  • iomanip.h

Question No 8:
________ data type (Raise For Success) can operate on modulus operator.
  • int Correct
  • float
  • char
  • double

Question No 9:
What is the correct (Raise For Success) syntax of an array declaration, of double data type, for size 10 and intialized to value 0?
  • arr[10] = {0,0};
  • double arr [10]=0,0;
  • double arr[10] = {0,0}; Correct
  • double arr[] = 0,0;

Question No 10:
Each array declaration (Raise For Success) must provide the information about all these things except _______.
  • Name of the array 
  • Type of data stored in the array
  • The location of the first element to be stored Correct
  • Number of elements of the array


Question No 11:
Null character is (Raise For Success) used to indicate the  ________ of string.
start
end Correct
begin
middle

Question No 12:
The statement (Raise For Success) cout << yptr will show the  ______ the yptr points to.
  • Value
  • memory address Correct
  • Variable
  • None of the given

Question No 13:
In two-dimensional (Raise For Success) array, we use  _______ 'for loop(s)' to populate the array.
  • 1
  • 2 Correct
  • 3
  • 4

Question No 14:
The value of a (Raise For Success) pointer can be ______.
  • address of a variable
  • name of the variable
  • value of the variable Correct
  • none of the given options


Question No 15:
Which of the (Raise For Success) following is used to perform bit-wise OR operator?
  • ||
  • ^
  • | Correct
  • ~

Question No 16:
The expression (Raise For Success) ((a+b)== 10)&& ((x+y)== 20) is true only if:
  • Either ((a+b) == 10) or((x+y) == 20) is true
  • Both ((a+b) == 10) and ((x+y) == 20) are true Correct
  • ((a+b) == 10) is true
  • ((x+y) == 20) is true

Question No 17:

A function is a (Raise For Success) block of statements that can be defined once and used _______ in the program.
  • One time
  • Two times
  • Three times
  • As many times as user wants Correct

Question No 18:
In while loop (Raise For Success) the condition is checked ______ the execution of loop.
  • After
  • Before Correct
  • During
  • At any time


Question No 19:
These functions (Raise For Success) seekg() and seekp() requires an argument of type _______ to let them how many bytes to move forward or backward.
  • int
  • short
  • long Correct
  • double

Question No 20:
_______ statement (Raise For Success) is used to terminate the processing of a particular case and exit from switch structure.
  • if
  • goto
  • break Correct
  • continue

Question No 21:
How many (Raise For Success) elements are stored in the following?
  • 9
  • 20 Correct
  • 25
  • 10

Question No 22:
The data type (Raise For Success) before a function name represents its.
  • Return Type Correct
  • Function data
  • Function argument
  • Function name


Question No 23:
To read command-line (Raise For Success) argument, the main () function itself must be given _________ argument.
  • 1
  • 2 Correct
  • 3
  • 4

Question No 24:
Which header (Raise For Succes) file must be include to use the functions tolower() and toupper()?
  • iostream.h
  • conio.h
  • ctype.h Correct
  • stdlib.h

Question No 25:
Switch statement (Raise For Success) can be used in place of _______ statement.
  • break
  • continue
  • Multiple if Correct
  • goto


Question No 26:
Following in an (Raise For Success) array of ______ rows and _________ columns int num [3][4];
  • 4 , 5
  • 4 , 3
  • 2 , 3
  • 3 , 4 Correct

Question No 27:
Learning to program (Raise For Success) is important because it develop ______ and ______ abilities.
  • Reading, Writing
  • Reading, Problem solving
  • Analytical, Problem solving Correct
  • Analytical, Writing

Question No 28:
In the given (Raise For Success) expression which operator will be evaluated first?
10 + (6 / 2) - * 3?
  • +
  • -
  • / Correct
  • *


Question No 29:
What is the correct (Raise For Success) syntax to declare an array of 15 elements of type float?
  • float array[15]; Correct
  • float[15] array;
  • float [15]array;
  • float array[14;]

Question No 30:
A precise sequence (Raise For Success) of steps to solve a problem is called ______
  • C++
  • Program Correct
  • Statement
  • Routine

Previous Post Next Post