Home / C Programming / Pointers :: Discussion

Discussion :: Pointers

  1. What will be the output of the program ?

    
    #include 
    int *check(static int, static int); 
     int main()
     {
          int *c; 
          c = check(10, 20);  
          printf("%d\n", c);    
          return 0; 
     } 
    int *check(static int i, static int j)
     {    
          int *p, *q;   
          p = &i;    
          q = &j;   
          if(i >= 45)  
            return (p);  
       else       
            return (q);
     } 
    

  2. A.

    10

    B.

    20

    C.

    Error: Non portable pointer conversion

    D.

    Error: cannot use static for function parameters

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    No answer description available for this question.


Be The First To Comment