#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
Differentiate fundamental data types and derived data types in C.
Once I have used freopen, how can I get the original stdout (or stdin) back?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
Why c is procedure oriented?
What is malloc calloc and realloc in c?
How can I send mail from within a c program?
What is %g in c?
Is c pass by value or reference?
What is the difference between new and malloc functions?
What are header files and what are its uses in C programming?
What is the difference between the local variable and global variable in c?
Explain what is the difference between text files and binary files?
Explain how do you print only part of a string?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
Who is the main contributor in designing the c language after dennis ritchie?