C Program to Print Integers

« Previous Program Next Program »

Print Integers in C

To print integers in C programming, use printf() function with %d format specifier as shown here in the following program.

C Programming Code to Print Integers

Following C program prints the value of the variable num which holds an integer value:

/* C Program - Print Integers */

void main()
int num=10;
printf("The value of num is %d",num);

When the above c program is compile and executed, it will produce the following result:

c program print integer

Same Program in Other Programming Language

You may also like same program in other programming languages:

« Previous Program Next Program »

Latest 5 Posts by CodesCracker


Quick Links
Signup - Login - Give Online Test