Preprocessors


  1. Comment on the output of the following C code.
     #include <stdio.h>
    #define num 200);
    int main()
    {
    printf("%d\n", num
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    200


  1. Which of the following Macro substitution are accepted in C?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    None of these



  1. What will be the output of the following C code?
    #include <stdio.h>
    #define calcA 5 + 3
    #define calcB 4 + 6
    int main()
    {
    int Res = calcA * calcB;
    printf("%d\n", Res);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    23


  1. What will be the output of the following C code?
    #include <stdio.h>
    # define count
    void fun()
    {
    printf("Welcome");
    }
    void main()
    {
    count;
    fun();
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Welcome



  1. What will be the output of the following C code?
     #include <stdio.h>
    void main()
    {
    #define count 55
    count = 23;
    printf("%d", count);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Compilation Error

    main.c: In function ‘main’:
    main.c:5:15: error: lvalue required as left operand of assignment
    count = 23;