Home / ECE / Microprocessors :: Section 2

ECE :: Microprocessors

  1. Which of the following conditional statements is not valid in Pascal?

  2. A.
    If A > = B then B : = C + D + X
    B.
    If (N = 45) THEN X : = X + 2 ELSEX : = 0
    C.
    If A < = B then A : = C * D
    D.
    If (A > = B) X : Y else X : = Z

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. A computer program is used to read N and compute N !. IF N = 6, the result will be

  4. A.
    6
    B.
    12
    C.
    720
    D.
    1040

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Consider the following statement in Basic

    15 INPUT X, Y, Z
    20 IF Y > X THEN 25
    21 IF Z > Y THEN 30
    25 PRINT Y
    30 PRINT Z, X
    35 END


    IF X, Y, Z are 150, 200, 250 then the output will be

  6. A.
    200, 250, 150 respectively
    B.
    150, 200, 250 respectively
    C.
    250, 200, 150 respectively
    D.
    200, 150, 250 respectively

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. The port of PC to which mouse is connected is called

  8. A.
    serial port
    B.
    parallel port
    C.
    input port
    D.
    scanner port

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. FORTRAN expression for 3b2-5a2 is

  10. A.
    SQRT (3 * B ** 2 - 5 * A ** 2)
    B.
    SQRT 3 * B ** 2 - 5 * A ** 2
    C.
    SQRT (3 * b ** 2 - 5 * a ** 2)
    D.
    SQRT (3 * B ** 2) - SQRT (5 * A **2)

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. If J = 12 and X = 24.4 the result of the following FORTRAN 77 program will be

    READ *, J, X
    K = J ** 2
    Z = 3 * X
    Print *, J, K, Z

  12. A.
    12, 144, 73.2
    B.
    15.0, 144.0, 73.2
    C.
    15.0, 144.0, 73
    D.
    15. 144. 73

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Consider the following about 'arrays' in C

    1. An array is a collection of similar elements.
    2. An array can not have 10 numbers 5 of which are ints and 5 are floats.
    3. An array can have ints and chars in the same array.
    Which of the above are correct?

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

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. A computer program is used to read M and print the sum 2 + 4 + 6 + 8 +.........+ 2M. If M = 9 , the print out will show the number

  16. A.
    9
    B.
    18
    C.
    90
    D.
    100

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Read the following rules for scanning Boolean expressions in Pascal

    1. The expressions are scanned from left to right.
    2. The operations are scanned in the order NOT, AND, OR.
    3. All operators (i.e., NOT, AND and OR) are scanned together.
    4. In one scanning all the operators of only one type are scanned.
    Which of the above are correct?

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

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. IC 74181 performs arithmetic operations when M = 1.

  20. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum