codescracker


c

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 */
		
#include<stdio.h>
#include<conio.h>
void main()
{
	clrscr();
	int num=10;
	printf("The value of num is %d",num);
	getch();
}

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 »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test