Write a program to demonstrate print to increament and decreament operator
Program:
#include<stdio.h> #include<conio.h> void main() { int x=5; x++; //post increment operator printf("x=%d",x); ++x; //pre increment operator printf("x=%d",x); x--; //post decrement operator printf("x=%d",x); --x; //pre decrement operator printf("x=%d",x); getch(); }
Output:
x=6x=7x=6x=5
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Program:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer