What is the output for the program given below
typedef enum grade{GOOD,BAD,WORST,}BAD;
main()
{
BAD g1;
g1=1;
printf("%d",g1);
}
Answer Posted / fefrf
In linux you get following error
enum.c:2: error: `BAD' redeclared as different kind of symbol
enum.c:2: error: previous declaration of `BAD'
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is the purpose of the preprocessor directive error?
How to define structures? ·
Ow can I insert or delete a line (or record) in the middle of a file?
Explain enumerated types.
How do you define structure?
What is string concatenation in c?
What are pointers? What are stacks and queues?
What is integer constants?
What is the easiest sorting method to use?
Why are all header files not declared in every c program?
What are the types of i/o functions?
What is function prototype in c language?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
What is wrong with this program statement? void = 10;