More Classes
5th Class
6th Class
7th Class
8th Class
9th Class
10th Class
11th Class
12th Class
NAT I
NAT II
CSS
IQ
General Knowledge
MDCAT
ECAT
GAT General
GAT Subject
Other Links
Go to Home
Online Tests
CS-201 Final Term Exams Preparation Virtual University MCQs With Answers
Question # 1
Overloaded new operator function takes parameter of type size_t and returns
Choose an answer
void (nothing)
void pointer
object pointer
int pointer
Previous
Skip
Next
Question # 2
The code is written to __________ the program.
Choose an answer
implement
design
analysis
none of the given options
Previous
Skip
Next
Question # 3
NULL value has been defined in ______ and _________ header files.
Choose an answer
strings.h and iostream.h
ctype.h and conio.c
conio.c and conio.h
stdlib.h and stddef.h
Previous
Skip
Next
Question # 4
What will be the correct syntax to assign an array named arr of 5 elements to a pointer ptr?
Choose an answer
*ptr = arr ;
ptr = arr ;
*ptr = arr[5] ;
ptr = arr[5] ;
Previous
Skip
Next
Question # 5
New operator is used to allocate memory from the free store during
Choose an answer
Compile Time
Run Time
Link Time
None of the given options
Previous
Skip
Next
Question # 6
If there is more than one statement in the block of a for loop, which of the following must be placed at the beginning and the ending of the loop block?
Choose an answer
parentheses ( )
braces { }
brackets [ ]
arrows < >
Previous
Skip
Next
Question # 7
What is the sequence of event(s) when allocating memory using new operator?
Choose an answer
Only block of memory is allocated for objects
Only constructor is called for objects
Memory is allocated first before calling constructor
Constructor is called first before allocating memory
Previous
Skip
Next
Question # 8
To include code from the library in the program, such as iostream, a directive would be called up using this command.
Choose an answer
#include “iostream.h”
include <iostream.h>
include <iostream.h>
#include <iostream.h>
Previous
Skip
Next
Question # 9
The appropriate data type to store the number of rows and colums of the matrix is____________.
Choose an answer
float
int (Not sure)
char
none of the given options
Previous
Skip
Next
Question # 10
Which of the following function call is correct for the function prototype? defaultParameters ( int a, int b = 7, char z = ‘*’ );
Choose an answer
defaultParameters (5);
defaultParameters (5, ‘8’);
defaultParameters (6, ‘#’);
defaultParameters (0, 0, ‘*’, 0);
Previous
Skip
Next
Question # 11
Which one of the following is the declaration of overloaded pre-increment operator implemented as member function?
Choose an answer
Class-name operator +()
Class-name operator +(int)
Class-name operator ++() ;
Class-name operator ++(int) ;
Previous
Skip
Next
Back