Program to understand Prefix increment/decrement | Pre incremet and Pre decrement Operator in C

Spread the love

  1. /*Prefix increment/decrement*/
  2. #include<stdio.h>
  3. int main(void)
  4. {
  5.         int x=8;
  6.         printf(“x=%dt,x);
  7.         printf(“x=%dt,++x);   /*Prefix increment*/
  8.         printf(“x=%dt,x);
  9.         printf(“x=%dt,–x);   /*Prefix decrement*/
  10.         printf(“x=%dn,x);
  11.         return 0;
  12. }

Also Read :

  1. Modulo operator in C explained with Examples.
  2. In depth examples on Arithmetic operators.
  3. Arithmetic operators in C language.
  4. Compilation Stages in C language.
  5. Identifiers in C language and Rules for naming Identifiers.
  6. Structure of C Language.

Venkatesh Macha

Hi Guys, I am Venkatesh Macha. I am a programmer and an Open Source enthusiast, Presently working as a Software Engineer. Apart from that, I love to explore new technologies and things.

You may also like...

Leave a Reply