#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
How can you tell whether a program was compiled using c versus c++?
What are the rules for identifiers in c?
What is merge sort in c?
How do I get a null pointer in my programs?
What are the different categories of functions in c?
Why should I prototype a function?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
Explain how do you declare an array that will hold more than 64kb of data?
Why we use break in c?
What does int main () mean?
Which is best book for data structures in c?
why do some people write if(0 == x) instead of if(x == 0)?
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 the process to create increment and decrement stamen in c?
Write a program to generate the Fibinocci Series