#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 %lu in c?
What are the advantages of union?
Write a function that will take in a phone number and output all possible alphabetical combinations
What is the use of getch ()?
What is auto keyword in c?
write a program to find the given number is prime or not
What is calloc() function?
Do you know the use of fflush() function?
Tell us two differences between new () and malloc ()?
Write a program to check prime number in c programming?
Explain what are multidimensional arrays?
What is string constants?
What is return type in c?
What is use of integral promotions in c?
How can I manipulate strings of multibyte characters?