Constants


  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int const m = 10;
    m++;
    printf("m is %d", m);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Constant variable has to be declared and defined at the same time. Trying to change it results in an error.


  1. What will be the output of the following C code?
    #include <stdio.h>
    int const Result()
    {
    printf("interviewmania.com");
    return 0;
    }
    void main()
    {
    Result();
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    interviewmania.com