MCQ Bank
Global variables in C++ should always be referred to by using the
- A) Without an operator
- B) None of the given
- C) : operator
- D) :: operator
________ is a tool that can help us in reducing the size of individual functions.
- A) Abstraction
- B) Association
- C) Inheritance
- D) Modularity
MVC stands for ---------------
- A) Model View Controller
- B) Modern View Center
- C) Model View Center
- D) Modern View Controller
The order in which bytes of one word are stored is _________ dependent
- A) software
- B) hardware
- C) syntax
- D) language
-----provides a unified interface to a set of interfaces in a sub-system.
- A) All of the above
- B) Observer Pattern
- C) Singleton Pattern
- D) Façade Pattern
Which of the following shows a commented statement in C++
- A) // Ans = first + second
- B) \\ Ans = first + second
- C) /# Ans = first + second
- D) # Ans = first + second
if (e.Title() == “CEO” || e.Salary() > 10000)
in the above statement if (e.Title()=="CEO") is TRUE then
- A) Second part is not evaluated but e.Salary() is called
- B) Second part must also be TRUE
- C) Second part is always evaluated
- D) Second part is not evaluated
When programmers use shortcuts and cryptic codes in their program, ________ becomes a major problem.
- A) Availability
- B) Reusability
- C) Maintenance
- D) Readability
When a small set of functions (which use each other) is so overwhelmingly the bottleneck, there are two alternatives:
- A) changed programming language OR compiler at least
- B) use a better algorithm OR re-write the code
- C) debug the code OR place assertions in code
- D) remove the functions OR add more functions
x = 0; // x is floating pt
Which rewritten form of above line of code is more in line with the self-documentation philosophy than the code above.
- A) x = ‘\0’
- B) x = false
- C) x = NULL
- D) x = 0.0;
The idea behind exception handling is to raise some error flag every time ________
- A) The code compiles
- B) Something goes wrong
- C) The code links
- D) Memory is allocated
The process that involves verification of product with respect to its written requirements is called _________.
- A) Debugging
- B) Developement
- C) Maintainance
- D) Testing
Vertical partitioning is also known as…..
- A) Factoring
- B) Mutating
- C) Parallelizing
- D) Balancing
Distributing the responsibilities to different subsystems so that we get a software system which is easy to maintain, is called ………the architecture.
- A) Subtracting
- B) Cloning
- C) Partitioning
- D) Balancing
The size of __________ plays a significant role in making the program easy or difficult to understand.
- A) none of the above
- B) object
- C) data type
- D) function
One of the main reasons to make functions is ________.
- A) Maintainability
- B) Reliability
- C) Reusability
- D) Effeciency
The greatest advantage of exception handling is its ability to handle:
- A) Memory errors
- B) Syntax errors
- C) Asynchronous errors
- D) Control Structure errors
Exception handling is a powerful technique that separates error-handling code from
______ code.
- A) Normal
- B) Buggy
- C) Complex
- D) Faulty
The number __________ is the most abused symbol in programs written in C or C++.
- A) 1
- B) 2
- C) 3
- D) 0
_________ was the first pure Object Oriented language in which observer pattern was used in implementing its Model View Controller pattern
- A) C++
- B) PASCAL
- C) Smalltalk
- D) JAVA