Home / C Programming / Strings :: Discussion

Discussion :: Strings

  1. What will be the output of the program ?

    #include 
     int main() 
     {  
          printf("Fresher, "GATE/n");     
          return 0; 
     } 

     

     

  2. A.

    Error

    B.

    Fresher  GATE

    C.

    Fresher

    D.

    GATE

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    printf("Fresher", "GATE\n"); It prints "Fresher". Because ,(comma) operator has Left to Right associativity. After printing "Fresher", the statement got terminated.


Be The First To Comment