Home / C Programming / Functions :: Discussion

Discussion :: Functions

  1. What will be the output of the program?

    #include 
     int main() 
     {    
         void fun(char*);   
         char a[100];     
         a[0] = 'A'; a[1] = 'B';     
         a[2] = 'C'; a[3] = 'D';    
         fun(&a[0]);   
         return 0; 
    } 
    void fun(char *a) 
    {     
        a++;   
        printf("%c", *a);  
        a++;    
       printf("%c", *a);
     } 

     

     

  2. A.

    AB

    B.

    BC

    C.

    CD

    D.

    No output

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment