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;
}
Discussion:
168 comments Page 16 of 17.
Arjun Reddy said:
2 decades ago
Void is not a datatype.
It is a keyword.
It is a keyword.
Sunil Kumar(S.K) said:
1 decade ago
Only pointer can be void not a variable.
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:
2 decades 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.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers