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 |
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }
How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.
# include <stdio.h> int one_d[]={1,2,3}; main() { int *ptr; ptr=one_d; ptr+=3; printf("%d",*ptr); }
Write a procedure to implement highlight as a blinking operation
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
main() { extern int i; i=20; printf("%d",i); }
How we will connect multiple client ? (without using fork,thread)
What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
main( ) { static int a[ ] = {0,1,2,3,4}; int *p[ ] = {a,a+1,a+2,a+3,a+4}; int **ptr = p; ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *++ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); ++*ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); }
#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d..%d",*p,*q); }