Skip to content
Related Articles

Related Articles

C | Data Types | Question 6
  • Difficulty Level : Basic
  • Last Updated : 13 Sep, 2013
GeeksforGeeks - Summer Carnival Banner

Output?




int main()
{
    void *vptr, v;
    v = 0;
    vptr = &v;
    printf("%v", *vptr);
    getchar();
    return 0;
}

(A) 0
(B) Compiler Error
(C) Garbage Value


Answer: (B)

Explanation: void is not a valid type for declaring variables. void * is valid though.

Quiz of this Question

Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.
My Personal Notes arrow_drop_up
Recommended Articles
Page :