-->

about getchar() and putchar()

 getchar():-

It is an input function used to input one character. It does not accept more than one character. If we input more than one then it truncates remaing charcaters.

Syntax:-

variable=getchar();

Example:

char a;

printf("enter a character\n");

a=getchar();

printf("character=%c",a);

putchar():

It is an outputput function used to output one character.It works like printf(). It does not display  more than one character. If we input more than one then it truncates remaing charcaters an dprints the first character.

Syntax:-

putchar(variable);

Example:

char a;

printf("enter a character\n");

a=getchar();

putchar(a);

1 comment:

  1. The Game of Roulette - Ozlemg | Buy Online Casino Gambling
    The Game 바카라 사이트 casinopan of Roulette. If you love 우리 카지노 도메인 the roulette 한국어 온라인 카지노 wheel, you'll have to cupofcoupons.com choose between two or 바카라 4 줄 시스템 more different betting types.

    ReplyDelete