{
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 |
write a program to Insert in a sorted list
Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }
String copy logic in one line.
main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }
int swap(int *a,int *b) { *a=*a+*b;*b=*a-*b;*a=*a-*b; } main() { int x=10,y=20; swap(&x,&y); printf("x= %d y = %d\n",x,y); }
why the range of an unsigned integer is double almost than the signed integer.
#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?
Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?
Write a procedure to implement highlight as a blinking operation
main() { char not; not=!2; printf("%d",not); }