Simple Example Program For Printf


In C,the printf function writes a formatted string.


printf("Text to be displayed : %access_specifiers", variable);

Simple Example For Print a Number

/* Example program to print a number In C Programming Language*/
// Header Files

//Main Function
int main()
	// Assigining the variable num
	int num=100;
	// Printing the output
	printf("Printing a number:%d",num);
	// Output screen waits until get a character
	// Returning to the main function
	return 0;

Sample Output:

Printing a number:100


Top Pages