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 is the difference between postfix and prefix unary
increment operators?

Answers were Sorted based on User's Feedback



what is the difference between postfix and prefix unary increment operators?..

Answer / rukmanee

In prefix operator,the value of the operand increase by one
and then assign the new value to that operand and print
it.In postfix operator,the value of the operand is assigned
at first and then increment it's value by one.
This is the difference between postfix and prefix unary
increment operators.

Is This Answer Correct ?    8 Yes 1 No

what is the difference between postfix and prefix unary increment operators?..

Answer / tarun kumar

In prefix operator In postfix operator
#include<iostream.h> #include<iostream.h>
#include<coino.h> #include<coino.h>
void main() void main()
{ {
int i=10; int i=10;
int j=++i; int j=i++;
cout<<j; cout<<j;
getch(); getch();
} }
OUTPUT:11 OUPUT:10

Is This Answer Correct ?    3 Yes 1 No

what is the difference between postfix and prefix unary increment operators?..

Answer / bhupender

PER FIX UNARY INCREMENT OPERATION IS ++I
POSTT FIX UNARY INCREMENT OPERATION IS i++
WHEN WE USE THIS IN PROGRAM THE RESULT WILL
FOR ++i IS

LIKE TWO VERIABLE INT A=5 AND B=++A+5 THEN
IN RESULT IT SHOWS A =5 BUT B WILL 10(5+5)
BUT IN POST FIX IT
A=5 BUT B= A++ MEANS A+1 AND RESULT FOR B WILL 11

Is This Answer Correct ?    2 Yes 10 No

Post New Answer

More C Interview Questions

Explain what’s a signal? Explain what do I use signals for?

0 Answers  


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

0 Answers  


Where are the auto variables stored?

0 Answers   TISL,


How can I find out if there are characters available for reading?

0 Answers  


Why doesn't the code "int a = 1000, b = 1000; long int c = a * b;" work?

7 Answers  


Explain what will the preprocessor do for a program?

0 Answers  


What is data type long in c?

0 Answers  


Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

0 Answers   Expedia,


How is = symbol different from == symbol in c programming?

0 Answers  


How do you print an address?

0 Answers   TCS,


Explain how do you search data in a data file using random access method?

0 Answers  


WHAT IS PRE POSSESSORS?

6 Answers   TATA,


Categories