Home / C Programming / C Preprocessor :: Point Out Correct Statements

C Programming :: C Preprocessor

  1. Which of the following are correct preprocessor directives in C?

    1: #ifdef
    2: #if
    3: #elif
    4: #undef

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

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of the following are correctly formed #define statements in C?

  4. A.
    #define CUBE (X) (X*X*X);
    B.
    #define CUBE(x) (X*X*X)
    C.
    #define CUBE(X)(X*X*X)
    D.
    #define CUBE(X) {X*X*X}

    View Answer

    Workspace

    Discuss Discuss in Forum