Home / C Programming / C Preprocessor :: Discussion

Discussion :: C Preprocessor

  1. What will be the output of the program?

     #include
     #define JOIN(s1, s2) printf("%s=%s %s=%s \n", #s1, s1, #s2, s2);
     int main() 
     {   
        char *str1="Fresher";   
        char *str2="GATE";    
        JOIN(str1, str2);    
        return 0; 
    } 
    

     

  2. A.

    str1=FresherGATE str2=GATE

    B.

    str1=FresherGATE str2=GATE

    C.

    str1=Fresherstr2=FresherGATE

    D.

    Error: in macro substitution

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment