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

What does == mean in texting?

681


Who invented bcpl language?

715


What are header files why are they important?

592


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2313


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

640






a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

732


Explain what is the difference between a string and an array?

644


Do you know the use of 'auto' keyword?

668


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

1796


What is the difference between variable declaration and variable definition in c?

572


What are the features of the c language?

656


What are actual arguments?

654


how many key words availabel in c a) 28 b) 31 c) 32

641


Is it better to use malloc() or calloc()?

658


Write a program to print fibonacci series without using recursion?

621