C Programming - Declarations and Initializations - Discussion

Discussion Forum : Declarations and Initializations - Point Out Errors (Q.No. 2)
2.
Point out the error in the following program.
#include<stdio.h>
int main()
{
    void v = 0;

    printf("%d", v);

    return 0;
}
Error: Declaration syntax error 'v' (or) Size of v is unknown or zero.
Program terminates abnormally.
No error.
None of these.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
165 comments Page 17 of 17.

Divya said:   1 decade ago
void is not in datatype.

Raviteja said:   10 years ago
It's can't void as main.

Reema said:   8 years ago
Void is not a keyword.

Jeratin said:   8 years ago
The void is datatype.

Mymuna said:   2 decades ago
Correct.


Post your comments here:

Your comments will be displayed after verification.