MCQ Bank
in C/C++, which of the following data type is used to store real numbers?
- A)
- B)
- C)
- D)
These functions seekg() and seekp() requires an argument of type ____________to determine that how many bytes to be move forward or backward.
- A) short
- B) long
- C) double
- D) int
C/C++ has many libraries which contain variables and function names normally starting with ________
- A)
- B)
- C)
- D)
A structure is a collection of _____________under a single name.
- A) None of the given
- B) values
- C) data
- D) variables
The coding of a program is translated into machine language by ________
- A)
- B)
- C)
- D)
_______ is the pointer which determines the position in a file from where the next read operation occurs.
- A) Tell
- B) Set
- C) Get
- D) Put
Learning "How to program" is important, because it develops ________ and problem solving abilities.
- A)
- B)
- C)
- D)
We have opened a file stream myfile for reading (getting), myfile.tellg () gives us the current get position of the file pointer. It returns a whole number of type___________
- A) short
- B) int
- C) long
- D) double
in C/C++, the algebraic expression (b2-4ac)/2a can be written as:
- A)
- B)
- C)
- D)
_________ is a special type of pointer we have to cast it before we use it.
- A) integer
- B) void
- C) double
- D) float
In C/C++, which of the following data type is used to store real member?
- A)
- B)
- C)
- D)
Which of the following is NOT a valid preprocessor directive?
- A) #ifdef
- B) #pragma
- C) #define
- D) #function
To understand programming concepts, ________ programming language being used as a vehicle in cs201 "Introduction to programming" course.
- A)
- B)
- C)
- D)
The object code of our program is combined with the _______________.
- A) source program
- B) with header files
- C) machine code of the operating system
- D) object code of the library functions
The bit manipulators operator ________ is used to check whether a specific bit is set or not.
- A)
- B)
- C)
- D)
Once we have defined a symbolic constant value using #define, that value _________during program execution.
- A) becomes zero
- B) cannot be changed
- C) can be changed
- D) varies
in C++, which operator is used while accessing through the pointer to structure?
- A)
- B)
- C)
- D)
The data members of the class are initialized ______________.
- A) at runtime
- B) within main program
- C) outside the function
- D) at compile time
Function seekg() and seekp() require an argument of type ________ to let them know how many bytes to move forward backward.
- A)
- B)
- C)
- D)
How many bits form a byte?
- A) 8
- B) 4
- C) 2
- D) 6