#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 the collection of communication lines and routers called?
What is static function in c?
Explain the ternary tree?
Differentiate between new and malloc(), delete and free() ?
What is c programing language?
Differentiate between a structure and a union.
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
Is a pointer a kind of array?
What do you mean by invalid pointer arithmetic?
Why n++ execute faster than n+1 ?
Differentiate between calloc and malloc.
What are register variables in c?
Differentiate between the = symbol and == symbol?
What is extern storage class in c?