# define x=1+4;
main()
{
int x;
printf("%d%d",x/2,x/4);
}
Answer Posted / rama krishna sidhartha
The preprocessor syntax is wrongly written. It should be as
follows :
#define x 1+4
void main()
{
printf("%d%d",x/2,x/4);
}
There is no need of declaring the variable 'x' in
between 'main()' function since it is already declared
in '#define' directive.
The output will be : 3 and 2
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is function what are the types of function?
What is double pointer in c?
What is the difference between the local variable and global variable in c?
What is spark map function?
Give me the code of in-order recursive and non-recursive.
What are identifiers and keywords in c?
What are the application of c?
Differentiate between ordinary variable and pointer in c.
what are the advantages of a macro over a function?
Whats s or c mean?
Explain how can I avoid the abort, retry, fail messages?
What is the best organizational structure?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
I have a varargs function which accepts a float parameter?
Explain 'bus error'?