int a = 10 + 10
....
,...
A = A * A
What would be the value of A?
The answer is 120!! Could anyone explain this to me.
Answers were Sorted based on User's Feedback
Answer / vinayak bhat
a=10*10
It s a macro concept,,very simple
a=a*a becomes
a=10+10*10+10
* has highest priority than +
hence expression becomes like
a=10+(10*10)+10
a=10+100+10
a=120
| Is This Answer Correct ? | 24 Yes | 6 No |
Answer / nagarajanselvaraj
In C everything is case sensitive
so variable with name 'a' differs from variable
with name 'A'
The given result is not possible
because 120 is not a square number.
| Is This Answer Correct ? | 21 Yes | 4 No |
can u give me the c codings for converting a string into the hexa decimal form......
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("\n%d", sizeof(u)); printf(" %d", sizeof(u.a)); // printf("%d", sizeof(u.a[4].i)); } a. 4, 4, 4 b. 40, 4, 4 c. 1, 100, 1 d. 40 400 4
what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }
hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?
write a simple calculator c program to perform addition, subtraction, mul and div.
0 Answers United Healthcare, Virtusa,
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(ā%dā,k); }
void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
Write a program that reads a dynamic array of 40 integers and displays only even integers
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
how can u draw a rectangle in C
53 Answers Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,