Home / C Programming / Strings :: Discussion

Discussion :: Strings

  1. What will be the output of the program ?

    #include 
    
     int main()
     {
         printf(5+"FresherGATE\n");  
         return 0; 
     } 
    

  2. A.

    Error

    B.

    FresherGATE

    C.

    GATE

    D.

    None of above

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    printf(5+"FresherGATE\n"); In the printf statement, it skips the first 5 characters and it prints "GATE"


Be The First To Comment