{
int *ptr=(int*)malloc(sizeof(int));
*ptr=4;
printf("%d",(*ptr)+++*ptr++);
}
Answers were Sorted based on User's Feedback
Answer / rohit choudhary
4+6
as *ptr++=4 hence *ptr=5
then ++*ptr=6
so 4+6=10
ans is 10
| Is This Answer Correct ? | 2 Yes | 6 No |
Answer / prateek
compile error...!!
because malloc syntax is a=(int*)malloc(size of(int)
| Is This Answer Correct ? | 1 Yes | 7 No |
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }
main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }
plz send me all data structure related programs
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
how to test pierrot divisor
What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?
1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?
How will u find whether a linked list has a loop or not?
main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i); } a. Runtime error. b. 100 c. Some Integer not 100 d. None of the above
prog. to produce 1 2 3 4 5 6 7 8 9 10
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }