Home / C Programming / Declarations and Initializations :: Point Out Correct Statements

C Programming :: Declarations and Initializations

  1. Which of the declaration is correct?

  2. A.
    int length;
    B.
    char int;
    C.
    int long;
    D.
    float double;

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of the following operations are INCORRECT?

  4. A.
    int i = 35; i = i%5;
    B.
    short int j = 255; j = j;
    C.
    long int k = 365L; k = k;
    D.
    float a = 3.14; a = a%3;

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which of the following correctly represents a long double constant?

  6. A.
    6.68
    B.
    6.68L
    C.
    6.68f
    D.
    6.68LF

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of the structure is incorrcet?

    1 :
    struct aa
     {    
        int a;    
        float b; 
    }; 
    2 :
    struct aa
     {    
         int a;   
         float b;     
         struct aa var;
     };
    
    3 :
    struct aa 
    {     
        int a;    
        float b;     
        struct aa *var;
     };

  8. A.

    1

    B.

    2

    C.

    3

    D.

    1, 2, 3

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Which of the structure is correct?

    1 :
    struct book 
    {     
          char name[10];   
          float price;    
          int pages; 
    };
    2 :
    struct aa 
    {    
          char name[10];   
          float price;  
          int pages; 
    }
    3 :
    struct aa
     {     
         char name[10];  
         float price;     
         int pages; 
    }

  10. A.

    1

    B.

    2

    C.

    3

    D.

    All of above

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. 1 : typedef long a;
    extern int a c;
    2 : typedef long a;
    extern a int c;
    3 : typedef long a;
    extern a c;

  12. A.
    1 correct
    B.
    2 correct
    C.
    3 correct
    D.
    1, 2, 3 are correct

    View Answer

    Workspace

    Discuss Discuss in Forum