What will this program print, incremental operator - C Operator

C examples for Operator:Increment Decrement Operator

Description

What will this program print, incremental operator

Demo Code

#include <stdio.h> 
#define FORMAT "%s! C is cool!\n" 
int main(void) 
{ 
     int num = 10; 
 
     printf(FORMAT,FORMAT); /*ww  w. j  ava2  s. c  o m*/
     printf("%d\n", ++num); 
     printf("%d\n", num++); 
     printf("%d\n", num--); 
     printf("%d\n", num); 
     return 0; 
}

Result


Related Tutorials