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 / rahul khare

6
becoz it(++*p) will evaluate like this-
1)
*(p)- gives value at this address that is 5
2)
now increment ++5
that is 6.

Is This Answer Correct ?    37 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is context in c?

921


Can I initialize unions?

1037


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

1090


What is the default value of local and global variables in c?

1038


What is 02d in c?

1072


What is c language in simple words?

1068


Is there a way to compare two structure variables?

1111


Is null valid for pointers to functions?

1169


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1111


What is a buffer in c?

997


What are the advantages of using linked list for tree construction?

1084


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

2172


Write a program with dynamically allocation of variable.

1121


What is wrong with this initialization?

1005


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

1251