This blog consists of C and C++ programs. C and C++ programming is the basics to learn any programming language. Most of the programs are provided with their respective outputs. This blog also contains Data Structures programs using Object-Oriented Programming (C++). Some of the best books for learning C and C++ programming are also mentioned.

Friday 1 November 2013

C program for Unary Operators

C program for Unary Operators:

#include<stdio.h>
#include<conio.h>
main(){
int a=9;
clrscr();
printf("\na=%d",a);
printf("\na=%d",a++);
printf("\na=%d",a);
printf("\na=%d",++a);
printf("\na=%d",a);
printf("\na=%d",a--);
printf("\na=%d",a);
printf("\na=%d",--a);
printf("\na=%d",a);
getch();
}

No comments:

Post a Comment