Home / General Knowledge / Testing sawaal :: Discussion

Discussion :: Testing sawaal

  1. What will be output of following program?


    #include <stdio.h>
    int main()

    {
       void (*p)();
       int (*q)();
       int (*r)();
       p = clrscr;
       q = getch;
       r = puts;
      (*p)();
      (*r)("www.sawaal.com");
      (*q)();
      return 0;
    }

  2. A.
    NULL
    B.
    www.sawaal.com
    C.
    Compilation error
    D.
    None of above

    View Answer

    Workspace

    Answer : Option B

    Explanation :


    p is pointer to function whose parameter is void and return type is also void. r and q is pointer to function whose parameter is void and return type is int . So they can hold the address of such function.


Be The First To Comment