Home » C Programming » Variables » Question
  1. What will happen if the below program is executed?
    #include <stdio.h>
    int main()
    {
    int main = 25;
    printf("%d", main);
    return 0;
    }

    1. It will cause a compile-time error
    2. It will cause a run-time error
    3. It will run without any error and prints
    4. It will experience infinite looping
Correct Option: C

A c program can have same function and variable name. This code will print 25.



Your comments will be displayed only after manual approval.