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:
166 comments Page 16 of 17.

HEMALATHA said:   1 decade ago
What is the format specifier for 'void'?

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:   8 years ago
Void function does not return a value.

Arul said:   6 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:   1 decade ago
Void means null. It returns nothing.

Surbhi said:   2 decades ago
Can we create void data types in c?

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


Post your comments here:

Your comments will be displayed after verification.