Read char with the getch() function and deal with Non-ANSI code - C Data Type

C examples for Data Type:char

Description

Read char with the getch() function and deal with Non-ANSI code

Demo Code

#include <stdio.h>
#include <conio.h>

int main( void )
{
     int ch;// ww w  .  j av a 2 s  .  c o  m

     while ((ch = getch()) != '\n')
         putchar(ch);

     return 0;
}

Result


Related Tutorials