#define f(x)
main()
{
printf("\n%d",f(2+2));
}
Answers were Sorted based on User's Feedback
Answer / g.j.hemalatha
f(x) is an identifier.No constants is defined in the macro
definition.So the answer is a garbage value.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / priyadarshan kasta
it will show a error message as expression syntax error
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / civa
Compiler Error "error: syntax error before ')' token"
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / suman halder
within printf statement,f(2+2) i.e f(4) must return a value so that this value could get printed through %d format specifier..
Now,as f(x) is a macro template and macro expansion code for this template is not specified..so,here the situation is like,we are trying to return an integer value from a function which is having a "void" return type..
so,compiler flashes "Expression syntax error"..as during preprocessing macro template can't be replaced by macro expansion...
Is This Answer Correct ? | 0 Yes | 0 No |
Display names and numbers of employees who have 5 years or more experience and salary less than Rs.15000 using array of structures (name, number, experience and salary)
How to set file pointer to beginning c?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
write c program to display output 10(10+20)+(10+20+30)+ ... n term
0 Answers Hindustan Gum Chemicals,
What is the difference between the local variable and global variable in c?
int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
write a program to create a sparse matrix using dynamic memory allocation.
Explain that why C is procedural?
how to devloped c lenguege?
What is the use of static variable in c?
write a c program to add two integer numbers without using arithmetic operator +
write a c program to find largest of three numbers using simple if only for one time.