Saturday 8 July 2017

getche

Getche function

Getche is same as getch function, both takes input from keyboard the difference is return type.
  • Getch does not echo given character only return integer value
  • Getche  echo and return integer code of given character

#include<stdio.h>
void main()
{
    char n;

    clrscr();
    printf("Enter number>> ");
    n=getche();  /* input will be echo */
}


No comments:

Post a Comment