MCQ Bank
if (!(block < activeBlock))
is equvivalent to:
- A) if ((block == activeBlock))
- B) None of the given
- C) if ((block < activeBlock))
- D) if ((block >= activeBlock))
Bit fields are a convenient way to express many difficult operations. However, bit fields suffer from one problem
- A) Lack of security
- B) Lack of usability
- C) Lack of portability
- D) Lack of performance
There are ……layers in OSI reference model.
- A) 6
- B) 8
- C) 7
- D) 5
Goto statements violate the idea of
- A) structured code
- B) object oriented code
- C) repetition structure
- D) control structure
if a major rework is required to translate a program written for one environment to another, it means code is not or less _________
- A) Bug Free
- B) plateform dependent
- C) Secure
- D) Portable
using proper paranthesis normally makes the code
- A) easy to understand
- B) All of the given options
- C) less ambigous
- D) easy to read
Vertical partitioning divides the architecture application from a …… making perspective.
- A) Decision
- B) Conclusion
- C) Move
- D) Design
Which of the following is used for multi level commenting?
- A) */ Comment/*
- B) // Comment
- C) /* Comment */
- D) (Comment)
for (i =0, col = 0; i < 27; i++, j++)
In the above line of the code, 27 is representing____________.
- A) Positive Numbers
- B) Constant Numbers
- C) Real Numbers
- D) Magic Numbers
________ and _________ are two important tools that helps in managing the program complexity.
- A) Composition, Inheritance
- B) Abstraction, Encapsulation
- C) Modularity, Composition
- D) Aggregation, Inheritance
The three basic principles that guide maintainability are:
(a)clarity
(b)enhancement
(c)flexibility
(d)simplicity
(
- A) (a),(b) and (c)
- B) (a),(c) and (d)
- C) All of above
- D) (b),(c) and (d)
Code should not be:
- A) aligned
- B) indented
- C) commented
- D) cryptic
In the N-Tire Architecture,the idea is to enhance scalability and -------------- by distributing both the data and the application using multiple server machines.
- A) Interoperability
- B) Performance
- C) Usability
- D) Integrity
Names representing methods and functions should be----and written in mixed case starting with -----case.
- A) Verb----lower
- B) Verb----upper
- C) Noun----upper
- D) Noun----lower
Class variables should never be declared public. Public variables violate which of the following:
- A) Encapsulation
- B) None of the given
- C) Information hiding
- D) Information hiding and Encapsulation
Constant values used in the program are called_________.
- A) Real Numbers
- B) Magic Numbers
- C) Positive Numbers
- D) Constant Numbers
In case of using unrelated operators in a single expression, _________ would be the best choice to prevent the logical errors.
- A) Parenthesis
- B) Indents
- C) Short Cuts
- D) Comments
Be very careful when you use functions with side effects – functions that change the values of the
________
- A) Variables
- B) Objects
- C) Structures
- D) Classes
Consider the following statement:
int a,b=10;
Which of the following is correct:
- A) Both variables "a" and "b" are initialized to 10
- B) Variable "b" is initialized to 10
- C) variable "a" is initialized to 10
- D) variables can not be initialized this way
Patterns are devices that allow programs to share knowledge about their -------------.
- A) Analysis
- B) Code
- C) Design
- D) Implementation