Home / C Programming / Complicated Declarations :: Discussion

Discussion :: Complicated Declarations

  1. Point out the error in the following program.

     #include
     #include
    
      int main() 
      {  
            static char *p = (char *)malloc(10);  
            return 0;
      } 
    

  2. A.

    Error: Lvalue required

    B.

    Error: Rvalue required

    C.

    Error: invalid *p declaration

    D.

    No error

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    No answer description available for this question.


Be The First To Comment