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

If you had the following code: int x = 23; int *y; y = &x;
The instruction y++; does what?

Answer Posted / naresh kumar

here Y is integer pointer which is storing address of x.
suppose we assume address of X is 65524. this value will stored in pointer variable Y. int variable is capable of storing 2 bytes of memory. If increment or decrement variable Y, It points to next memory location, i.e 65526.

that means y=65524
y++
65526
y++
65528
this will keep on increasing by 2 bytes.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a Default constructor?

1505


What does the nocreate and noreplace flag ensure when they are used for opening a file?

1061


Explain about vectors in c ++?

972


What do you mean by early binding?

1012


How to declare a function pointer?

956


Explain what happens when a pointer is deleted twice?

1195


How many types of classes are there in c++?

986


What is double in c++?

1000


Is c++ primer good for beginners?

991


Does c++ have foreach?

983


Is string an object in c++?

1108


Explain one-definition rule (odr).

1068


What is the default width for ouputting a long integer using the insertion operator?

1179


What is lambda in c++?

1127


What are the two shift operators and what are their functions?

1038