Question # 2 of 10 ( Start time: 10:27:43 PM ) Total Marks: 1
The expressions with logical operators can be evaluated only from ___________________.
Select correct option:
Right to left
Left to right
Top to bottom
Bottom to top
Question # 3 of 10 ( Start time: 10:28:21 PM ) Total Marks: 1
In the switch statement, cases should always end with a -------statment.
Select correct option:
Switch
Go
Break ok
Stop
Question # 4 of 10 ( Start time: 10:29:15 PM ) Total Marks: 1
Variables should be initialized where they are ------and they should be declared in the ------scope possible.
Select correct option:
defined and smallest
declared and medium
defined and medium
declared and smallest ok
Question # 5 of 10 ( Start time: 10:29:57 PM ) Total Marks: 1
________ and _________ are two important tools that helps in managing the program complexity.
Select correct option:
Composition, Inheritance
Abstraction, Encapsulation ok
Aggregation, Inheritance
Modularity, Composition
Question # 6 of 10 ( Start time: 10:30:41 PM ) Total Marks: 1
Class variables should never be declared public. Public variables violate which of the following:
Select correct option:
Information hiding
Encapsulation
Information hiding and Encapsulation ok
None of the given
Question # 7 of 10 ( Start time: 10:31:08 PM ) Total Marks: 1
1) x = (a + 2 > 3)? a : a-1 ; 2) if((a + 2)> 3) x = a; else x = a - 1;
Select correct option:
Statement (1) is more complex than (2) ok
Statement (2) is more complex than (1)
Both statements are very complex
None of the given options
Question # 8 of 10 ( Start time: 10:31:49 PM ) Total Marks: 1
Global variables in C++ should always be referred to by using the
Select correct option:
:: operator ok
: operator
Without an operator
None of the given
Question # 9 of 10 ( Start time: 10:32:12 PM ) Total Marks: 1
The size of __________ plays a significant role in making the program easy or difficult to understand.
Select correct option:
function ok
object
data type
none of the above
Question # 10 of 10 ( Start time: 10:32:40 PM ) Total Marks: 1
“Description of communicating objects and classes that are customized to solve a general design problem in a particular context.” is called ----------
Select correct option:
Design Pattren ok
System Pattren
System Design
None of the given
Question # 1 of 10 ( Start time: 10:20:39 PM ) Total Marks: 1
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.
Select correct option:
x = false
x = NULL
x = 0.0; ok
x = ‘\0’
Question # 2 of 10 ( Start time: 10:20:57 PM ) Total Marks: 1
Names representing methods and functions should be----and written in mixed case starting with -----case.
Select correct option:
Noun—lower
Verb----lower ok
Noun ---upper
Noun----upper
Question # 3 of 10 ( Start time: 10:21:18 PM ) Total Marks: 1
Patterns are devices that allow programs to share knowledge about their -------------.
Select correct option:
Code
Design ok
Analysis
None of the given
Question # 4 of 10 ( Start time: 10:21:35 PM ) Total Marks: 1
C++ header files should have the extension---- Source files can have the extension ----
Select correct option:
.c and .h
.cc and .h
.h and .cpp ok
All of the given
Question # 5 of 10 ( Start time: 10:21:48 PM ) Total Marks: 1
In case of header files, construction is to avoid ------ errors. The construction should appear in the top of the file (before the file header).
Select correct option:
compilation ok
run time
logical
All of the given
Question # 6 of 10 ( Start time: 10:22:22 PM ) Total Marks: 1
Code should not be:
Select correct option:
commented ok
indented
cryptic
aligned
Question # 7 of 10 ( Start time: 10:22:41 PM ) Total Marks: 1
Charles Simonyi first discussed Hungarian Notation. He was of ------ .
Select correct option:
Microsoft ok
IBM
Dell
Cisco
Question # 8 of 10 ( Start time: 10:23:10 PM ) Total Marks: 1
_________ was the first pure Object Oriented language in which observer pattern was used in implementing its Model View Controller pattern
Select correct option:
Smalltalk ok
PASCAL
JAVA
C++
Question # 9 of 10 ( Start time: 10:23:39 PM ) Total Marks: 1
Goto statements violate the idea of
Select correct option:
object oriented code
structured code ok
control structure
repetition structure
Question # 10 of 10 ( Start time: 10:24:33 PM ) Total Marks: 1
________ and _________ are two important tools that helps in managing the program complexity.
Select correct option:
Composition, Inheritance
Abstraction, Encapsulation ok
Aggregation, Inheritance
Modularity, Composition
Question # 1 of 10 ( Start time: 10:15:20 PM ) Total Marks: 1
80/20 rule states that:
Select correct option:
you spend 80 percent of your time in 20 percent of the code ok
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 # 2 of 10 ( Start time: 10:15:36 PM ) Total Marks: 1
It ensures that a class only has one instance and provides a global point of access to it.
Select correct option:
Singleton Pattern ok
Observer Pattern
Real Pattern
None of the given
Question # 3 of 10 ( Start time: 10:16:20 PM ) Total Marks: 1
-----provides a unified interface to a set of interfaces in a sub-system.
Select correct option:
Observer Pattern
Singleton Pattern
Façade Pattern ok
All of the above
Question # 4 of 10 ( Start time: 10:16:44 PM ) Total Marks: 1
Names representing methods and functions should be----and written in mixed case starting with -----case.
Select correct option:
Noun—lower
Verb----lower ok
Noun ---upper
Noun----upper
Question # 5 of 10 ( Start time: 10:16:58 PM ) Total Marks: 1
Anti-patterns is another concept that corresponds to common ------------- in analysis and design.
Select correct option:
mistakes ok
issues
problems
All of the given
Question # 6 of 10 ( Start time: 10:17:47 PM ) Total Marks: 1
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.
Select correct option:
x = false
x = NULL
x = 0.0; ok
x = ‘\0’
Question # 7 of 10 ( Start time: 10:18:09 PM ) Total Marks: 1
A self documenting code is a code that explains itself without the need of comments and extraneous documentation, like _______
Select correct option:
Flowcharts
UML diagrams
Process-flow state diagrams
All of the given choices ok
Question # 8 of 10 ( Start time: 10:18:37 PM ) Total Marks: 1
Identifier names also play a significant role in enhancing the -------- of a program.
Select correct option:
Writ ability
Readability ok
Reliability
All of the given choices
Question # 9 of 10 ( Start time: 10:19:13 PM ) Total Marks: 1
"is" prefix should be used for------ variables and methods.
Select correct option:
General
Boolean ok
Constant
None of the given
Question # 10 of 10 ( Start time: 10:19:28 PM ) Total Marks: 1
which of the following statements are same in output: 1) a = a >> 2 2) a = a / 4 3) a = a * 2
Select correct option:
(1) and (3) only
(2) and (3) only
(1) and (2) only ok
All procduce the same result
Question # 1 of 10 ( Start time: 10:05:31 PM ) Total Marks: 1
Be very careful when you use functions with side effects – functions that change the values of the ________
Select correct option:
Objects
Classes
Structures
Variables ok
Question # 2 of 10 ( Start time: 10:06:03 PM ) Total Marks: 1
which of the following statements are same in output: 1) a = a >> 2 2) a = a / 4 3) a = a * 2
Select correct option:
(1) and (3) only
(2) and (3) only
(1) and (2) only ok
All procduce the same result
Question # 3 of 10 ( Start time: 10:06:57 PM ) Total Marks: 1
STL Stnads for ------------------
Select correct option:
Standard Template Library ok
Standard Type Link
Standard Tempo Line
None of the given
Question # 4 of 10 ( Start time: 10:07:36 PM ) Total Marks: 1
C++ header files should have the extension---- Source files can have the extension ----
Select correct option:
.c and .h
.cc and .h
.h and .cpp ok
All of the given
Question # 5 of 10 ( Start time: 10:08:14 PM ) Total Marks: 1
Switch statement is equal to ___________ statement.
Select correct option:
if
if-else
nested if
if-else if ok
Question # 6 of 10 ( Start time: 10:09:12 PM ) Total Marks: 1
A function should not be larger in any case and should not exceed ______ in length .
Select correct option:
Half page
One page ok
Two pages
Three Pages
Question # 7 of 10 ( Start time: 10:09:40 PM ) Total Marks: 1
Comma ( , ) is very dangerous because
Select correct option:
Compiler does not recognise this symbol
It creates linkage problem
It causes side effects ok
All of the given options
Question # 8 of 10 ( Start time: 10:10:24 PM ) Total Marks: 1
Which one of these is a correct short cut used by the programmer?
Select correct option:
x*=a ok
x=*a
x*a=
=a*x
Question # 9 of 10 ( Start time: 10:11:01 PM ) Total Marks: 1
The number __________ is the most abused symbol in programs written in C or C++.
Select correct option:
1
0 ok
2
3
Question # 10 of 10 ( Start time: 10:11:31 PM ) Total Marks: 1
Names representing methods and functions should be----and written in mixed case starting with -----case.
Select correct option:
Noun—lower
Verb----lower ok
Noun ---upper
Noun----upper