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 16 of 17.

Saurav kumar roy said:   8 years ago
Void is not a keyword, it is a datatype.

Mamatha said:   1 decade ago
Void does not contain any return value.

Rohit singh said:   1 decade ago
Void doesnt contain any type of value.

Jothipriya said:   7 years ago
Void function does not return a value.

Arul said:   5 years ago
Void is a no return type in function.

Atul said:   1 decade ago
Error: variable or field we is void.

Dharani Reddy said:   10 years ago
Void means null. It returns nothing.

Surbhi said:   1 decade ago
Can we create void data types in c?

Nkv said:   1 decade ago
void does not have return type.

Srividhya said:   1 decade ago
void does not return anything.


Post your comments here:

Your comments will be displayed after verification.