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

What are directives in c?

937


What is difference between array and structure in c?

1119


Do pointers store the address of value or the actual value of a variable?

1040


Is void a keyword in c?

941


can we implement multi-threads in c.

1102


write a proram to reverse the string using switch case?

2905


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

1225


ATM machine and railway reservation class/object diagram

5207


write a programming in c to find the sum of all elements in an array through function.

2140


What is cohesion and coupling in c?

999


What is the difference between functions getch() and getche()?

1058


What are reserved words with a programming language?

1087


Explain can static variables be declared in a header file?

1121


What is static memory allocation? Explain

1059


What is the difference between struct and union in C?

1268