What will be the output of the program #include<stdio.h> int main() { int x=30, *y, *z; y=&x; /* Assume address of x is 500 and integer is 4 byte size */ z=y; *y++=*z++; x++; printf("x=%d, y=%d, z=%d\n", x, y, z); return 0; }

Comments and Answers (2)

Sudepthi ~ Hyderabad

Sudepthi ~ Hyderabad

Good

Dharsini ~ Chennai

Dharsini ~ Chennai

[27/03, 7:05 pm] Aachu: X = 30 nu solitanga
[27/03, 7:05 pm] Aachu: Y is address of x
[27/03, 7:06 pm] Aachu: Address of x is 500
[27/03, 7:06 pm] Aachu: Apro z++ nu potrukanga first 500 tha eduku
[27/03, 7:07 pm] Aachu: Y 4 bytes kati 500 +4 = 504
[27/03, 7:07 pm] Aachu: Y = Z kati both hold same
[27/03, 7:07 pm] Aachu: Value nu nenakara
[27/03, 7:07 pm] Aachu: But na sona logic correct ah pa

Avatar

{{SampleComment.userName || "Your Name"}} ~ {{SampleComment.userCity}}

{{SampleComment.commentValue || "Your Answer or Comment goes here...."}}