Electronics and Communication Engineering - Microprocessors

16.
Consider the following expressions in Java
int a, b, c,
a = 40;
b = a++ ;
c = ++a ;

Now the values of a, b, c are
42, 40, 42 respectively
42, 42, 42 respectively
40, 42, 42 respectively
40, 40, 42 respectively
Answer: Option
Explanation:

The steps are : a is given the value 40, b is given the value of a before it is incremented (i.e., 40) and a is incremented to 41, a is incremented to 42 and c is given this value. Thus the result is 42, 40, 42.


17.
Which of the following is not correct in C?
6 / 4 = 1
2 / 5 = 0
2.0 / 5 = 0
2.0 / 5.0 = 0.4
Answer: Option
Explanation:


18.
Which is not a software?
DOS
Windows
MS WORD
Hard disk
Answer: Option
Explanation:

Hard disc is a memory storage device.


19.
Which of the following integer expressions is incorrect in Pascal?
L div M + P
A * * B
A div B - C
A mod B
Answer: Option
Explanation:

Two operators cannot be together.


20.
Accumulator is an 8 bit register and is also known as register B.
True
False
Answer: Option
Explanation:

Accumulator is register A.