main()
{
int a=2,*f1,*f2;
f1=f2=&a;
*f2+=*f2+=a+=2.5;
printf("\n%d %d %d",a,*f1,*f2);
}
Answers were Sorted based on User's Feedback
Answer / odelu vanga
*f2=*f2+(*f=*f2+(a=a+2.5))
a=a+2.5=4
so *f2=4
*f2=*f2+4=8
now *f2=8
so *f2=*f2+8=16
ans:- 16 16 16
| Is This Answer Correct ? | 18 Yes | 3 No |
Answer / susie
Answer :
16 16 16
Explanation:
f1 and f2 both refer to the same memory location a. So
changes through f1 and f2 ultimately affects only the value
of a.
| Is This Answer Correct ? | 6 Yes | 3 No |
Answer / kamlesh meghwal
LOL@Govind Verma....how u r gettin 888..hehe..!!1
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / forgot_my_name
Since we are modifying same variable three times in the same line (before sequence point ) so we broke the rules, so whatever compiler says would be right..
@Kamlesh Meghwal : In GCC compiler ans is 8 8 8.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vamshikrishna
12 12 12
explanition.
printf takes the last updated value and prints for every var
i.e,
a=a+2.5=4
so f2=4
f2=f2+4=8
here again f2 =4 "since f2=&a"
so f2=f2+4=12
| Is This Answer Correct ? | 3 Yes | 3 No |
Display the time of the system and display the right time of the other country
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
0 Answers Mbarara University of Science and Technology,
int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all.
2 Answers Mentor Graphics, Microsoft,
main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
write a c-program to find gcd using recursive functions
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }
main() { int i=10; void pascal f(int,int,int); f(i++,i++,i++); printf(" %d",i); } void pascal f(integer :i,integer:j,integer :k) { write(i,j,k); }
main() { main(); }
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
Is the following code legal? struct a { int x; struct a b; }