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:
165 comments Page 15 of 17.
Viniya philip said:
1 decade ago
Void is a return type of function not for variable.
Devi said:
1 decade ago
Void is a data type and we can use it at any time.
Abd said:
7 years ago
@All.
You cannot declare a variable of type void.
You cannot declare a variable of type void.
Lokesh sharma said:
1 decade ago
It is void keyword which do not return any value.
Ishwariya said:
1 decade ago
It is an error because void is not a data type.
SuryaMaruti said:
1 decade ago
I think void is not variable define datatype.
Prasad said:
1 decade ago
Please tell me void is data type or keyword?
Arjun Reddy said:
1 decade 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'?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers