Why the below program throughs error during compilation?
#include<stdio.h>
#include<conio.h>
enum
{
ZERO,
ONE,
TWO,
};
main()
{
printf("%d",&TWO);
getch();
}
Answer Posted / modassir alam
TWO or any enum variable not hold memory address hence error
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Why void main is used in c?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
What functions are used in dynamic memory allocation in c?
What is dynamic variable in c?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
Explain how do you view the path?
What are register variables in c?
Where is volatile variable stored?
What is the best way of making my program efficient?
What are the types of pointers in c?
What are void pointers in c?
What is the difference between pure virtual function and virtual function?
Explain what is the difference between text files and binary files?
Explain what is gets() function?
Is malloc memset faster than calloc?