Multiple Choice Questions 2
  1. The constant 0.15e+6 represents the same value as _______.

  2. 150000.0
    6.15
    0.75
    0.21
    None of the above.

  3. What would be printed by the following program ? ( The symbol '#' stands for one blank character.)


  4. int main(void)
    {double a, b;

    a = 37.56;
    b = 101.117;
    printf("Is it %6.1f%9.4f", a, b);
    printf("?\n");

    return (0);
    }

    Is#it##37.6#101.1170?\n
    Is#it##37.6#101.1170?
    Is#it##37.5#101.1170?
    Is#it##37.6#101.117?\n
    None of the above.

  5. If num is a variable of type int and temp is a variable of type double, how could you correctly complete this function call?
  6. scanf("%1f%d",_______);

    num, temp
    &num, &temp
    temp, num
    &temp, &num
    None of the above.

  7. Which of the following are valid identifiers ?
  8. i. R3D3
    ii. per-capita
    iii. phone#
    iv. ice_cream
    v. 92_aardvarks

    i, ii, iv, v
    i, iv
    i, ii
    ii, iv, v
    All are valid.

  9. The program language C was developed by

  10. John von Neumann
    John Atanasoff
    Niklaus Wirth
    Dennis Ritchie
    Guy Steele

  11. ______ is a set of values and a set of operations on those values.

  12. file
    data type
    precedence rule
    library
    language standard

  13. Which of the following expression does not evaluate to 3 ?

  14. 2 + 16 % 5
    7 - 15 / 4
    6 * 5 / 10
    2 - 4 * 3 + 26 / 2
    8 - 5

  15. The ANSI standard for the C language was approved in ______.

  16. 1968
    1972
    1979
    1984
    1989

  17. Which of the following expression has the value 0 if and only if the value of N is divisible by 20 ?

  18. syntax errors
    run-time errors
    result errors
    arithmetic faults
    all of the above

  19. A program that uses prompting messages to direct the user's input is running in _____.

  20. batch mode
    arithmetic/logic mode
    interactive mode
    assembly language mode
    memory mode

Visited times since 26 Aug 1998.