#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
What is storage class?
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
Is there any demerits of using pointer?
Is there a way to jump out of a function or functions?
How can I do peek and poke in c?
What is "Duff's Device"?
Which is better malloc or calloc?
What are pointers?
Define the scope of static variables.
What are the advantages of union?
How do you determine whether to use a stream function or a low-level function?
What are the uses of null pointers?
Can you write the algorithm for Queue?
how do you execute a c program in unix.
Explain the use of function toupper() with and example code?