Home / C Programming / Typedef :: Discussion

Discussion :: Typedef

  1. What will be the output of the program?

     #include 
    
      int main()
      {
         typedef int arr[5];   
         arr iarr = {1, 2, 3, 4, 5};      
         int i;  
         for(i=0; i4; i++)         
            printf("%d,", iarr[i]);     
         return 0; 
    } 
    

     

  2. A.

    1, 2, 3, 4

    B.

    1, 2, 3, 4, 5

    C.

    No output

    D.

    Error: Cannot use typedef with an array

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    No answer description available for this question.


Be The First To Comment