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 is a void pointer in c?

1040


Why is #define used?

1229


write a program to rearrange the array such way that all even elements should come first and next come odd

2224


What is ## preprocessor operator in c?

1025


What is a far pointer in c?

990


Is a house a shell structure?

1108


write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list

2741


Whats s or c mean?

950


main() { printf("hello"); fork(); }

1148


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

1070


a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

1054


What is data types?

1020


Explain how can type-insensitive macros be created?

954


Write a program to swap two numbers without using third variable?

1247


What is identifier in c?

965