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...

find the output of the following program
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}

Answer Posted / manishsoni

main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
it allocate as this

____ _____
x| |value p | | store &x
| 5 | | 100 |
|____| |_____|
____ _____
|100 |&x | 200 |&p p is pointer //at statement ++*p
|____| |_____|
^ ^
|________________|
and jumpt at 5 bcoz it is prefix for firstof all 5 is
increase then print

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the data types present in c?

1243


Can a void pointer point to a function?

1083


What is binary tree in c?

1138


What are the different file extensions involved when programming in C?

1347


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

2434


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

1121


if p is a string contained in a string?

1892


What is memcpy() function?

1169


What does p mean in physics?

1100


Is c dynamically typed?

1214


p*=(++q)++*--p when p=q=1 while(q<=6)

1822


What is the size of enum in bytes?

1137


What is the scope of an external variable in c?

1097


Explain how do you determine the length of a string value that was stored in a variable?

1204


What are the application of void data type in c?

1238