#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 / divakar
ouput :value of x=5
bcoz sqr(x+1)=(x+1*x+1) if u substitute x=2 u will get 5
since '*' is having more priority than '+'
at the of prog if u add prinf("%d",x); u will get 2
bcoz x value is not changed
| Is This Answer Correct ? | 32 Yes | 4 No |
Post New Answer View All Answers
What is wild pointer in c?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What is const keyword in c?
Which is an example of a structural homology?
what do u mean by Direct access files? then can u explain about Direct Access Files?
how should functions be apportioned among source files?
Is sizeof a keyword in c?
Explain what are multidimensional arrays?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
What is the c value paradox and how is it explained?
How can I read in an object file and jump to locations in it?
What is a program?
What is double pointer in c?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
Explain what is a const pointer?