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 / ankit panwar

*ptr++ : it just increments the pointer not the value it is
pointing to..

++*ptr : it increments the value the pointer points to but
not the pointer..

here

(*ptr++) + (++*ptr) = 0 + (4+1) = 5

so the answer will definately be 5

Is This Answer Correct ?    2 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are the variables argc and argv are local to main?

1249


Write a Program to find whether the given number or string is palindrome.

1224


What does calloc stand for?

1081


Explain what is a 'locale'?

1013


Explain how are portions of a program disabled in demo versions?

1068


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1006


Explain what is the difference between far and near ?

1046


What are header files in c?

1016


What is the purpose of ftell?

1031


Write a code to determine the total number of stops an elevator would take to serve N number of people.

1187


What is pass by reference in functions?

769


What is a shell structure examples?

1025


What is assert and when would I use it?

962


Is c still used?

995


What is the size of structure pointer in c?

1015