Home / C Programming / Structures, Unions, Enums :: Discussion

Discussion :: Structures, Unions, Enums

  1. Which of the following statements correctly assigns 12 to month using pointer variable pdt?

      #include   
       struct date  
       {      
           int day;   
           int month;    
           int year;    
     };
     int main() 
     {  
       struct date d;   
       struct date *pdt;  
       pdt = &d; 
       return 0;
     } 
    

  2. A.

    pdt.month = 12

    B.

    &pdt.month = 12

    C.

    d.month = 12

    D.

    pdt->month = 12

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    No answer description available for this question.


Be The First To Comment