#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 / gg
Ans : 5
I agree with Divakar ans & similar answers.
sqr(x+1)=x+1*x+1=2+1*2+1=5, but not 2*2+1
| Is This Answer Correct ? | 17 Yes | 0 No |
Post New Answer View All Answers
In C language what is a 'dangling pointer'?
Why is C language being considered a middle level language?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
Explain what are the standard predefined macros?
What is the benefit of using #define to declare a constant?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
What is the difference between typedef and #define?
Why use int main instead of void main?
Why do we use header files in c?
What would be an example of a structure analogous to structure c?
What is the difference between int main and void main?
How do you determine whether to use a stream function or a low-level function?
what do you mean by inline function in C?
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above