Skip to main content

Data Output printf and Putchar Example in C

1 min read Updated June 30, 2026
Share:
On this page (7sections)

About this program

This is an example program in **data input and output programs in c **. Read the concept first: printf and scanf in C, then study the code and output below.

Definition for printf and putchar

  • In C Programming,printf function to output a formatted string.
  • putchar function to output a Single character.Writes a character to the standard output (stdout).

Syntax for printf and putchar()

printf(const char *format, ...);
putchar(character/character variable);

Example Program Data Output In C (printf and putchar)

/* Example Program For Data Output printf and putchar Example In C Programming Language
  little drops @ thiyagaraaj.com
  Coded By:THIYAGARAAJ MP       */
// Header Files
#include<stdio.h>
#include<conio.h>

//Main Function
int main()
{
	//Printf Standard Ouput Statement
	printf("Data Output Using Printf\n");

	// Print Single Character
	putchar('a');
	// Wait For Output Screen (Not working in gcc compiler, please remove it. In gcc compiler)
	getch();

	//Main Function return Statemen
	return 0;
}

Sample Output:

Data Output Using Printf

a

Learn the concept first, then study the code:

Frequently Asked Questions

What does this C program do?
It is a C example program that demonstrates Data Output printf and Putchar, including the complete source code and the expected sample output.
How do I compile and run this C program?
Save the code in a `.c` file, compile it with `gcc filename.c -o program`, then run it with `./program` (or `program.exe` on Windows).
What concepts does this example use?
This example uses core C syntax, illustrating a common pattern in C programming.

Related Tutorials

Search tutorials