Open In App

C | Data Types | Question 6

Like Article
Like
Save
Share
Report

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


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads