MCQ Bank
Floating point constants should always be written with decimal point and at least
- A) none of the given
- B) two decimal
- C) one decimal
- D) three decimal
Variables should be initialized where they are ------and they should be declared in the ------scope possible.
- A) defined and medium
- B) declared and smallest
- C) declared and medium
- D) defined and smallest
The complexity of a program may ______ if there are exceptional paths in it
- A) Cutback
- B) Decrease
- C) Remain same
- D) Increase
The form for (;;) should be used for
- A) nested loop
- B) more than 1000 iterations
- C) empty loop
- D) less than 1000 iterations
In case of header files, construction is to avoid ------ errors. The construction should appear in the top of the file (before the file header).
- A) logical
- B) All of the given
- C) compilation
- D) run time
A self documenting code is a code that explains itself without the need of comments and extraneous documentation, like _______
- A) Process-flow state diagrams
- B) Flowcharts
- C) UML diagrams
- D) All of the given choices
STL Stnads for ------------------
- A) Standard Tempo Line
- B) Standard Template Library
- C) Standard Type Link
- D) Standard Type Link
In order to write a portable code which of the following guideline will not be helpful:
- A) Stick to the standards
- B) Size of data types
- C) Using vendor specific language extensions
- D) Program in the mainstream
It ensures that a class only has one instance and provides a global point of access to it.
- A) Singleton Pattern
- B) Observer Pattern
- C) Real Pattern
- D) None of the given
Which one of these is a correct short cut used by the programmer?
- A) x*a=
- B) x*=a
- C) =a*x
- D) x=*a
Identifier names also play a significant role in enhancing the -------- of a program.
- A) All of the given choices
- B) Reliability
- C) Readability
- D) Writ ability
If a function changes the value of some other accessible data object along with returning its value after execution, is called ___________.
- A) Short Circuiting
- B) Side Effects
- C) Abstraction
- D) Modularity
_________ cause major portability issues
- A) Conditional Structures
- B) Sizes of data types
- C) Bugs in code
- D) Loops
“Description of communicating objects and classes that are customized to solve a general design problem in a particular context.” is called ----------
- A) System Design
- B) Design Method
- C) Design Pattren
- D) System Pattren
Which indent size eliminates the chance of code lines splitting?
- A) 4
- B) 2
- C) 3
- D) 6
Exception handling provides:
- A) Error Handling mechanism
- B) Both Portability & Code Usability mechanism
- C) Portability mechanism
- D) Code Usability mechanism
1) x = (a + 2 > 3)? a : a-1 ;
2) if((a + 2)> 3)
x = a;
else
x = a - 1;
- A) None of the given options
- B) Both statements are very complex
- C) Statement (2) is more complex than (1)
- D) Statement (1) is more complex than (2)
Some bit field members are stored:
I) left to right
II) right to left
III) in circular array
- A) Both (I) and (II) are true
- B) Only (II) is true
- C) only (I) is true
- D) Only (III) is true
Switch statement is equal to ___________ statement.
- A) if-else
- B) nested if
- C) if-else if
- D) if
Charles Simonyi first discussed Hungarian Notation.
He was of ------ .
- A) IBM
- B) Microsoft
- C) Cisco
- D) Dell