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

What will be the output of
x++ + ++x?

Answer Posted / naveenkumari

here we can see two types of increments pre and post
increment . since x++ is post increment first the value is
assigned and then increments but in case of ++x first the
value is incremented and then assigned since x is not
initialized with any value the above expression gives a
garbage value .For example if x is initialized with a value
"1" then the this expression gives the output as "3"

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are valid operations on pointers?

1201


What does the c in ctime mean?

1098


What is the use of in c?

1031


What is static and volatile in c?

1226


Differentiate between declaring a variable and defining a variable?

1045


How do you sort filenames in a directory?

1185


Explain can static variables be declared in a header file?

1155


Explain indirection?

1145


Explain 'far' and 'near' pointers in c.

1144


What does *p++ do?

1025


Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?

2693


What is your stream meaning?

1241


Is it fine to write void main () or main () in c?

1031


What is the difference between a function and a method in c?

1086


What does p mean in physics?

1046