what is the difference between postfix and prefix unary
increment operators?
Answer Posted / 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 |
Post New Answer View All Answers
What is meant by gets in c?
What language is windows 1.0 written?
How do I get a null pointer in my programs?
Explain how do you determine whether to use a stream function or a low-level function?
How can I generate floating-point random numbers?
What is array within structure?
Why do we use null pointer?
Do variables need to be initialized?
In which language linux is written?
What is the best style for code layout in c?
Why #include is used in c language?
Is the exit() function same as the return statement? Explain.
Which is better oop or procedural?
Explain what are header files and explain what are its uses in c programming?
Explain about the functions strcat() and strcmp()?