Electronics and Communication Engineering - Microprocessors

46.
Which of the following is not an integer constant?
0
-8
+1074
-8.1
Answer: Option
Explanation:

Integer constant should not have decimal point.


47.
Let JCOKE = 98 and LPEPSI = 42 Consider the statement

IF (JCOKE - 3 * LPEPSI) 5, 6, 7
5 JCOKE = JCOKE + 5
6 JCOKE = JCOKE + 8
7 JCOKE = JCOKE + 11

The value of JCOKE after the execution of above statement will be
103
106
109
none of the above
Answer: Option
Explanation:

Since (J COKE - 3 x L PEPSI) is negative, statement 5 is executed and the result is 98 + 5 = 103.


48.
Which of the following is not a valid real constant in C?
426
321.0
-621.231
+201.2314
Answer: Option
Explanation:

Real constant must have a decimal point.


49.
Which of the following is not a valid integer constant in C (for 16 bit)?
321
-162
-65321
+1
Answer: Option
Explanation:

The range is from - 32768 to + 32767.


50.
Assume that x = 5 and y = 2. Then in Java operation x + = y, the result is
x = 7
x = 2
x = 3
x = 2
Answer: Option
Explanation:

The operator + = means add and assign.