Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are types of preprocessor in c?

1031


Why is struct padding needed?

1042


What are comments and how do you insert it in a C program?

1210


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1032


What is the difference between c and python?

1121


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1029


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

2291


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(); }

2278


Where can I get an ansi-compatible lint?

1115


What does return 1 means in c?

1024


Why is event driven programming or procedural programming, better within specific scenario?

2382


What is the c language function prototype?

1052


What is string function in c?

960


What is the difference between array and structure in c?

1107


formula to convert 2500mmh2o into m3/hr

951