#include <stdio.h>
#define sqr(x) (x*x)
int main()
{
int x=2;
printf("value of x=%d",sqr(x+1));
}
What is the value of x?
Answer Posted / fazlur
Macro will blindly substitutes, it doesn't calculate. So
remember whenever you encounter the macro, you first
substitute the value then calculate later. Ofcourse the
answer would be 5 in this case.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
What is the easiest sorting method to use?
What does char * * argv mean in c?
What is a char in c?
What is pointer to pointer in c?
How can you avoid including a header more than once?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
What does calloc stand for?
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
How can I split up a string into whitespace-separated fields?
What should malloc(0) do?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
How many data structures are there in c?
How can a program be made to print the name of a source file where an error occurs?
What are valid signatures for the Main function?