Home / C Programming / Declarations and Initializations :: Discussion

Discussion :: Declarations and Initializations

  1. What is the output of the program

    
    #include
     int main() 
    {
         extern int fun(float);    
         int a;     
         a = fun(3.14);     
         printf("%d\n", a);    
         return 0;
     }
     int fun(int aa) 
    {    
     return (int)++aa; 
    } 
    

  2. A.

    3

    B.

    3.14

    C.

    D.

    4

    E.

    Compile Error

    View Answer

    Workspace

    Answer : Option E

    Explanation :

    2 Errors
    1. Type mismatch in redeclaration of fun
    2. Type mismatch in parameter aa


Be The First To Comment