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


Please Help Members By Posting Answers For Below Questions

Tell me the use of bit field in c language?

852


When would you use a pointer to a function?

808


What does main () mean in c?

867


How can a string be converted to a number?

766


What is scanf_s in c?

857


What are global variables and how do you declare them?

799


What are the ways to a null pointer can use in c programming language?

895


How do you do dynamic memory allocation in C applications?

854


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

1017


Explain the difference between getch() and getche() in c?

754


What is #define in c?

832


Is c pass by value or reference?

823


Are the variables argc and argv are local to main?

1019


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

1964


What is the difference between malloc() and calloc() function in c language?

837