answersLogoWhite

0

Give an code for getch

User Avatar

Anonymous

16y ago
Updated: 8/17/2019

#include <conio.h>

#include <stdio.h>

int mygetch (void)

{

int x;

x= getch ();

if (x==0) x= 1000+getch();

return x;

}

int main (void)

{

int key;

key = mygetch ();

if (key==1059) printf ("F1\n");

else printf ("%d\n", key);

return 0;

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Purpose of getch?

The purpose of getch() is to input a single character from the input stream.


Can you replace getch of C programming in Linux without using iostream header?

There is a 'getch' in 'conio.h' which has nothing to do with 'iostream'.


Why getch function has semicolen?

Without the semi-colon, getch is just an expression, not a statement.


Give you a Webkinz code or me will die?

give a webkinz code to me ok


Return value of getch?

char


How do you use getch function in c language?

getch is used for console applications and it's very useful because in a way how windows work when a console application has finished it's part windows closes it automatically with the code 0 meaning that program did not have any problems while was running. To prevent automatic shutdown for console applications getch can be used. So, when your program has finished all operations it will wait for an input (basically you will have to press any key to finish the application) from the user.


How do you give the code?

if you want to give it to him or her then give it to them


I need the code can you give me the pearl code?

there is no code for that


How you use getch in ubuntu Linux?

Quote taken from The Unix and Linux Forum: getch() is an ancient DOS syscall from even older versions of Borland Turbo C. Mostly nothing has it these days. Unquote. Search Google with "getch" and have a look through the webpages on the subject. There are no manual (man) pages for getch - I'm using Ubuntu 12.04.


Is it safe to give out your friend code?

yes !! its safe to give out your friend code!!!


Can you give me the code to somebody vmath?

plese can somebody give me there vmath code


What is the purpose of getch()?

getch() is a way to get a user-inputted character. It can be used to hold program execution, but the "holding" is simply a side-effect of its primary purpose, which is to wait until the user enters a character. getch() and getchar() are used to read a character from screen.