Electronics and Communication Engineering - Microprocessors

41. 

If A = 20 and B = - 7 in PASCAL, A mod B =

A. 6
B. 2
C. - 1
D. 3

Answer: Option A

Explanation:

It gives remainder in division operation.


42. 

Which of the following is a computer language?

A. MS WORD
B. Page maker
C. MS EXCEL
D. LISP

Answer: Option D

Explanation:

LISP is a computer language. The remaining are software packages.


43. 

Which of the following DO statements is invalid in FORTRAN 77?

A. DO 161 = 1, 15
B. DO 16 1 = 1, 10, 1
C. DO 16 I = - 5, 5, 2
D. none of the above

Answer: Option D

Explanation:

All are valid.


44. 

Read the following statements about files in Pascal

  1. A file is a data structure which consists of a sequence of components of the same type.
  2. The number of components in a file is variable.
  3. The components in a file can be accessed only sequentially starting from the beginning of the file.
Which of the above are correct?

A. All
B. 1 and 2 only
C. 2 and 3 only
D. 1 and 3 only

Answer: Option A

Explanation:

All statements are true.


45. 

Consider the following C program int ram

float alpha, gamma
ram = 6400
alpha = 0.562
gamma = alpha * ram + 1


Now consider the following statements about this program

  1. ram is an integer variable
  2. alpha, gamma are real variables
  3. *, + are arithmetic operators
  4. 0.562 may be an integer constant or real constant
Which of the above are correct?

A. All
B. 1, 2, 3 only
C. 2, 3, 4 only
D. 1, 2, 4 only

Answer: Option B

Explanation:

0.562 is not an integer constant.