Home » C Programming » Variables » Question
  1. What is the output of this C code?
    #include <stdio.h>
    int main()
    {
    printf("My Name is - %d \n", myName);
    return 0;
    }
    1. My Name is - myName;
    2. My Name is - followed by a junk value
    3. Compile time error
    4. My Name is -
Correct Option: C

It results in an error since myName is used without declaring the variable myName.



Your comments will be displayed only after manual approval.