GET EDUCATE

Contents
Basics of C Programming

⯈Basic C Programs

putchar function in C

  • This function prints the character on the screen and returns the ASCII value of it as the answer.
  • This is unformatted output function.
  • Prototype:
int putchar(int);

Example 1:

char ch = ‘A’;

getchar

putchar(ch);

It prints character A on the output screen.

#include<stdio.h>
int main()
{
char ch = 'A';
putchar(ch);
}
putchar
Output window of putchar
Scroll to Top