Question # 1
Str = 0;// str is string Which rewritten from of above line of code is more in line with the self-documentation philosophy than the code above.
Str = false;
Str = NULL;
Str = ‘;
Str = 0.0;
Question # 2
Struct packed_struct { unsigned int f1:1;} pack; Here in “packed_struct”:
Value of f1 =1
Size of f1 = 1 bit
Value of f1 should not exceede 1
None of given options
Question # 3
In the switch statement, cases should always end with a ——-statment.Switch
Go
Break
Stop
Question # 4
Bit fields are a convenient way to express many difficult operations. However, bit fields suffer from one problem.
Lack of Usability
Lack of Security
Lack of Performance
Lack of Portability Question # 5
If(!(block < activeBlock)) is equvivalent to.
If ((block < activeBlock))
If ((block == activeBlock))
If ((block >= activeBlock))
None of the given Question # 6
Bit fields allow the packing of data in a structure. Using Bit fields we can.
Read 9 bit integers
Avoid memory leakages
Avoid memory overflow
Avoid syntax errors
Question # 7
The order in which bytes of one word are stored is _________ dependent.
Hardware
Software
Language
Syntax
Question # 8
In order to write a portable code which of the following guideline will be helpful:
Stick to the standards
Program in the mainstream
Size of data types
All of give options
Question # 9
Complex expressions.
Make the code easy to modify
Make the code difficult to modify
Make the code easy to understand
Does not effect understandability
Question # 10
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.
x = false
x = NULL
x = 0.0;
x = ‘’
Question # 11
using proper paranthesis normally makes the code.
easy to read
easy to understand
less ambiguous
All of the given options Question # 12
The use of comments should be minimized by making the code self-documenting by appropriate name choices and an explicit logical structure.
TrueFalse
Question # 13
Bit fields allow the packing of data in a structure. using Bit fields we can:
Read 9 bit integers
Avoid memory leakages
Avoid memory overflow
Avoid syntax errors
Question # 14
1) x = (a + 2 > 3)? a : a-1 ; 2) if((a + 2)> 3) x = a; else x = a – 1;
Statement (2) is more complex than (1)
Statement (2) is more complex than (1)
Both statements are very complex
None of the given option
Question # 15
80/20 rule states that:
you spend 80 percent of your time in 20 percent of the code
you spend 20 percent of your time in 80 percent of the code
We should try to optimized 80 percent or at least 20 percent of the code
None of the given options.
Question # 16
Be very careful when you use functions with side effects – functions that change the values of the ________.
Objects
Classes
Structures
Variables Question # 17
Comma ( , ) is very dangerous because.
Compiler does not recognise this symbol
It creates linkage problem
It causes side effects
All of the given options Question # 18The C/C++ language has not specified whether ____ is arithmetic or logical.
Right shift >>
Right shift
&&
||
Question # 19In order to make a code more portable, Instead of using vendor specific language extensions, use _______ as much as possible.
STL
ANSI
ISO
CMMI
Question # 20 When a small set of functions (which use each other) is so overwhelmingly the bottleneck, there are two alternatives:
use a better algorithm OR re-write the code
debug the code OR place assertions in code
remove the functions OR add more functions
changed programming language OR compiler at least
Question # 21
_______ cause major portability issues
Loops (Not Sure)
Bugs in code
Sizes of data types
Conditional Structures
Question # 22
Some bit field members are stored: I) left to right II) right to left III) in circular array.
only (I) is true
Only (II) is true
Both (I) and (II) are true
All of the options (I, II and III) are true Question # 23
Comma ( , ) is very dangerous because
Compiler does not recognise this symbol
It creates linkage problem
It causes side effects
All of the given options
Question # 24
using proper paranthesis normally makes the code
easy to read
easy to understand
less ambiguous
All of the given options
Question # 25
A test case involves
Input/output specification plus a statement of the function under test
Steps to perform the function
Expected results that the software application produces
All of the given options
Question # 26
If an application fulfills its specifications but deviates from users expectations or their desired behavior. This means, software is verified but not ————
Validated
Corrected
Checked
Traced
Question # 27
The raising of the imaginary error flag is simply called raising or ________ an error.
Catching
Casting
Throwing None of given options
Question # 28struct packed_struct { unsigned int f1:1; } pack; Here in “packed_struct”:
value of f1 = 1
size of f1 = 1 bit
value of f1 should not exceede 1None of given options
Question # 29The idea behind exception handling is to raise some error flag every time ________.
The code compiles
The code links
Memory is allocated
Something goes wrongQuestion # 30A __________ is a variance from a desired product attribute.
Exception
Error
Mistake
Defect Question # 31The C/C++ language does not define the alignment of items within.
structures
classes
unions
All of the given options Question # 32
Consider the following statement: int a,b=10; Which of the following is correct:
variable “a” is initialized to 10
Variable “b” is initialized to 10 Both variables “a” and “b” are initialized to 10
variables can not be initialized this way
Question # 33Exception handling is a powerful technique that separates error-handling code from ______ code.
Normal
Faulty
Buggy
Complex
Question # 34Bit fields are a convenient way to express many difficult operations. However, bit fields suffer from one problem.
Lack of usability
Lack of security
Lack of performance
Lack of portabilityQuestion # 35The complexity of a program may ______ if there are exceptional paths in it
Decrease
IncreaseRemain same
All of given options
Question # 36When an error is thrown the overall system (on the lookout for this error flag) responds by ______ the error.
Ignoring
Casting
Catching
All of the given options Question # 37
Comments are not syntax checked
TRUE
FALSE
Question # 38
Client Server model tries to data and processing
Distribute
Merge
Clone
Proceed
Question # 39
Anti- Patterns is another concept that corresponds to common in analysis and design.
Mistake
Issues
Problems
All of the given
Question # 40
Three tier architecture contains layers
Presentation
Application
Database
All of the above
Question # 41
MVC stands for
Model View Controller
Modern View Center
Model View Center
Modern View Controller
Question # 42
Fat client model is one of the configurations of model
Data-Centered
Layered
Reference
Client Server
Question # 43
Description of communicating objects and classes that are customized to solved a general problem in a particular context is called
Design Pattern
System Patter
System Design
None of the Given
Question # 44
In the N-tire Architecture, the idea is to enhance scalability and by distributing both data and the application using multiple server machines.
Usability
Performance
Interpretability
None of the given
Question # 45
Dynamic process model shows the process ………….. of the system
Components
Objects
Structure
Linkage
Question # 46
It ensures that a class only has one instance and provides a global point of access to it.
Singleton Pattern
Observer Pattern
Real Pattern
None of the given
Question # 47
STL Stnads for ——————
Standard Template Library
Standard Type Link
Standard Tempo Line
None of the given
Question # 48
Three tier architecture contains ————- layers
Select correct option:
Presentation
Application
Database
All of the above
Question # 49
Which of following is/are among ten things,which the basic template of GOF design pattern includes.
Select correct option:
Problem
Context
Forces
All of the given
Question # 50
Vertical partitioning is also known as…..
Select correct option:
Balancing
Mutating
Parallelizing
Factoring
Question # 51
Patterns are devices that allow programs to share knowledge about their ————-.
Code
Design
Analysis
None of the given
Question # 52
N-tier architecture stems from the struggle to find a ———– between the fat-client architecture and the thin-client architecture.
Concurrency
Distribution point
Middle ground
Similarity
Question # 53
Vertical partitioning divides the architecture application from a …… making perspective.
Decision
Design
Conclusion
Move
Question # 54
Distributing the responsibilities to different subsystems so that we get a software system which is easy to maintain, is called ………the architecture. :
Subtracting
Partitioning
Cloning
Balancing
Question # 55
The nominal case should be put in the if-part and the exception in the else-part of an if statement.
TURE
FALSE
Question # 56
Charles Simonyi first discussed Hungarian Notation. He was of —— .
Microsoft
IBM
Dell
Cisco
Question # 58
The terms get/set must be used where an attribute is accessed
Indirectly
Directly
Question # 59
A self documented program/code contains the following attribute:
Size of each function
Choice of variable
Choice of variable
All of the given choices
Question # 60
“is” prefix should be used for—— variables and methods.
General
Boolean
Constant
None of the given
Question # 62
The use of comments should be minimized by making the code self-documenting by appropriate name choices and an
explicit logical structure.
TRUE
FALSE
Question # 63
Variables should be initialized where they are ——and they should be declared in the ——scope possible.
defined and smallest
declared and medium
defined and medium
declared and smallest
Question # 64
Unrelated variables should be declared in the same statement.
True
False
Question # 65
which of the following statements are same in output: 1) a = a >> 2 2) a = a / 4 3) a = a * 2
(1) and (3) only
(2) and (3) only
(1) and (2) only
All procduce the same result
Question # 66
Goto statements violate the idea of
object oriented code
structured code
control structure
repetition structure
Question # 67
MVC pattern was based on the ————— pattern.
Observer
Structural
Behavioral
None of given
Question # 68
Which one is correct?
double total = 0.5;
double total = .5;
double total = .50;
all of the given
Question # 69
Code should not be:
commented
indented
cryptic
aligned
Question # 70
Global variables in C++ should always be referred to by using the
:: operator
: operator
Without an operator
None of the given
Question # 71
_________ was the first pure Object Oriented language in which observer pattern was used in implementing its Model
View Controller pattern
Smalltalk
PASCAL
JAVA
C++
Question # 72
using proper paranthesis normally makes the code
easy to read
easy to understand
less ambigous
All of the given options
Question # 73
Which of the following shows a commented statement in C++
# Ans = first + second
// Ans = first + second
\\ Ans = first + second
/# Ans = first + second
Question # 74
The form for (;;) should be used for
nested loop
empty loop
more than 1000 iterations
Question # 76
Identifier names also play a significant role in enhancing the ——– of a program.
Writ ability
Readability
Reliability
Question # 77
It ensures that a class only has one instance and provides a global point of access to it.
Singleton Pattern
Observer Pattern
Real Pattern
None of the given
Question # 78
Names representing methods and functions should be—-and written in mixed case starting
with —–case.
Noun—lower
Verb—-lower
Noun —upper
Noun—-upper
Question # 79
—–provides a unified interface to a set of interfaces in a sub-system.
Observer Pattern
Singleton Pattern
Façade Pattern
All of the above
Question # 80
MVC stands for —————
Model View Controller
Modern ViewCenter
Model ViewCenter
Modern View Controller
Question # 81
A self documenting code is a code that explains itself without the need of comments and
extraneous documentation, like _______
Flowcharts
UML diagrams
Process-flow state diagrams
All of the given choices
Question # 82
Complex expressions:
Make the code easy to modify
Make the code difficult to modify
Make the code easy to understand
Does not effect understandablity
Question # 83
Comments should NOT be indented relative to their position in the code
TRUE
FALSE
Question # 84
—-Provides a unified interface to a set of interfaces in a sub-system
Observer Pattern
Singleton Pattern
Façade Pattern
All of the above
Question # 85
Vertical Partitioning is also know as
Balancing
Mutatin
Parallizing
Factoring
Question # 86
Façade Pattern provides a unified interface to a set of interfaces ina sub-system.
True
False
Question # 87
Which of the is/are among ten things which the basis template of GOF design pattern includes.
Problem
Context
Forces
All of the above
Question # 88
Thin Client Model places a heavy processing load on……
Only Server
Only Network
Both Server and Network
Neither server nor network
Question # 89
Zero install architecture does not need any installation on ____________.
Server side
Client side
Client & Server Side
None of the above
Question # 90
Data-Centered Architectural Style is also called ….
Repository model
Client Server model
Sub system model
Reference model