main()
{
int *ptr=(int*)malloc(sizeof(int));
*ptr=4;
printf("%d",(*ptr)+++*ptr++);
}
Answer Posted / vishnu
hi all,
i think *ptr=(int*)malloc(size of (int));
*ptr=4;
mean malloc(size of (int)) is used to allocate memory of only 4.
hence(*ptr)+++*ptr++)=4+4=8
| Is This Answer Correct ? | 28 Yes | 43 No |
Post New Answer View All Answers
What are types of preprocessor in c?
Why is struct padding needed?
What are comments and how do you insert it in a C program?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
What is the difference between c and python?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
Where can I get an ansi-compatible lint?
What does return 1 means in c?
Why is event driven programming or procedural programming, better within specific scenario?
What is the c language function prototype?
What is string function in c?
What is the difference between array and structure in c?
formula to convert 2500mmh2o into m3/hr