MCQ Bank
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
Macro is defined by ________ preprocessor directive.
- A)
- B)
- C)
- D)
Macros are categorized into _________ type(s).
- A) two
- B) one
- C) three
- D) four
In C++, when accessing files randomly, which function is used to get current pointer position inside a file?
- A)
- B)
- C)
- D)
Bugs can occur due to ____________________
- A) initialization of a variable
- B) object destruction
- C) uninitialized data
- D) default values
Which is not a preprocessor directive of C-Language?
- A)
- B)
- C)
- D)
__________ allow us to have a memory location and use it as int or char interchangeably
- A) union
- B) None of the given
- C) construct
- D) structures
The statement char arr[10]; is an example of a type of ________ memory allocation
- A)
- B)
- C)
- D)
Shifting the binary numbers is similar to shifting the _____ numbers.
- A) Base 7
- B) Decimal
- C) Octal
- D) Hexadecimal
What would be the output of the following statement? C=13%2;
- A)
- B)
- C)
- D)
a = a|b; ca be written as________________.
- A) a |=b;
- B) a=b;
- C) a =|b;
- D) a ==b;