Question # 1 of 10 ( Start time: 12:31:13 PM )  Total Marks: 1
The result of 4%3 will be
2
1.5

1
1.33

Question # 2 of 10 ( Start time: 12:31:34 PM )  Total Marks: 1
While developing a program; should we think about the user interface?

Yes
No

Question # 3 of 10 ( Start time: 12:32:03 PM )  Total Marks: 1
Which of the following is the right syntax to declare a variable in C++?
VariableName  Datatype;
DataType = VariableName;

DataType  VariableName;
(DataType)  VariableName;

Question # 4 of 10 ( Start time: 12:32:30 PM )  Total Marks: 1
What will be the resultant value of this expression x =17%3 ?
1

2
3
4
Question # 5 of 10 ( Start time: 12:32:50 PM )  Total Marks: 1
What will be the result of the expression k = ++m; if initially k = 0 and m = 5?
0
5
6
4
Question # 6 of 10 ( Start time: 12:33:08 PM )  Total Marks: 1
Function prototype is written,
Within main function
After the return statement in main
Before the return statement in main
Before call of that function
Question # 7 of 10 ( Start time: 12:34:02 PM )  Total Marks: 1
Switch statement can be used in place of _________ statement.
break
continue
Multiple if
goto
Question # 8 of 10 ( Start time: 12:34:46 PM )  Total Marks: 1
In while loop the loop counter must be initialized,
With in the loop

Before entering the loop
At the end of the loop
None of the given options
Question # 9 of 10 ( Start time: 12:35:28 PM )  Total Marks: 1
What logical error exists in the following arithmetic expression? X = 50 / ( 2 % 2 ) + 9
( ) parenthesis are not allowed in expressions
Division by zero will occur in this expression
Order of the expression is not according to rules
We can not use % operator in expressions
Question # 10 of 10 ( Start time: 12:36:06 PM )  Total Marks: 1
Loops are _______________ Structure.
Decision
Sequential

Repetition pg 560
None of the given options
Question # 1 of 10 ( Start time: 06:31:50 PM )  Total Marks: 1
if (a>b && a>c) then the condition will be true only if
Both a>b and a>c are true
a>b is false and a>c is true
a>b is true and a>c is false
Both a>b and a>c are false
Question # 2 of 10 ( Start time: 06:32:48 PM )  Total Marks: 1
In while loop the loop counter must be initialized,
With in the loop

Before entering the loop
At the end of the loop
None of the given options
Question # 3 of 10 ( Start time: 06:33:15 PM )  Total Marks: 1
__________ of a variable means the locations within a program from where it can be accessed.
Data type
Visibility
Value
Reference
Question # 4 of 10 ( Start time: 06:33:49 PM )  Total Marks: 1
Switch support_______________ data.
Integer
Character
Float
Both integer and character
Question # 5 of 10 ( Start time: 06:34:31 PM )  Total Marks: 1
A function is a block of statements that can be defined once and used ________ in the program.
One time
Two times
Three times

As many times as user wants
Question # 6 of 10 ( Start time: 06:35:13 PM )  Total Marks: 1
_________statement is used to terminate the processing of a particular case and exit from switch structure.
if
goto

break
continue

http://msdn.microsoft.com/en-us/library/wt88dxx6(v=vs.80).aspx
Question # 7 of 10 ( Start time: 06:35:32 PM )  Total Marks: 1
The most suitable data type for number 325.25 is ______.
char
int
short
float
Question # 8 of 10 ( Start time: 06:35:51 PM )  Total Marks: 1
X is an integer variable; what does X++ means,
Add 1 two times in X value

None of these
Question # 9 of 10 ( Start time: 06:36:12 PM )  Total Marks: 1
The operators ++ and –- are used to increment or decrement the value of a variable by ________

1
2
3
4
Question # 10 of 10 ( Start time: 06:36:34 PM )  Total Marks: 1
Which of the following loops checks the test condition at the end of the loop?
While
Do-While
For
Nested Loop
1.  Each pass through a loop is called a/an
[a] enumeration
[b] iteration
[c] culmination
[d] pass through

2.  Which looping process checks the test condition at the end of the loop?
[a] for
[b] while
[c] do-while
[d] no looping process checks the test condition at the end

[a] the return 0; statement
[b] the first statement after the loop
[c] the statement following the continue statement
[d] the next iteration of the loop

4.  In a group of nested loops, which loop is executed the most number of times?
[a] the outermost loop
[b] the innermost loop
[c] all loops are executed the same number of times
[d] cannot be determined without knowing the size of the loops

5.  The statement  i++;  is equivalent to
[a] i = i + i;
[b] i = i + 1;
[c] i = i - 1;
[d] i --;

6.  Which looping process is best used when the number of iterations is known?
[a] for
[b] while
[c] do-while
[d] all looping processes require that the iterations be known

7.  What's wrong?  for (int k = 2, k <=12, k++)
[a] the increment should always be ++k
[b] the variable must always be the letter i when using a for loop
[c] there should be a semicolon at the end of the statement
[d] the commas should be semicolons

8.  What's wrong?  while( (i < 10) && (i > 24))
[a] the logical operator && cannot be used in a test condition
[b] the while loop is an exit-condition loop
[c] the test condition is always false
[d] the test condition is always true

9.  If there is more than one statement in the block of a for loop, which of the following must be placed at the beginning and the ending of the loop block?
[a] parentheses ( )
[b] braces { }
[c] brackets [ ]
[d] arrows < >

10.  What's wrong?  (x = 4 && y = 5) ? (a = 5) ; (b = 6);
[a] the question mark should be an equal sign
[b] the first semicolon should be a colon
[c] there are too many variables in the statement
[d] the conditional operator is only used with apstrings