answersLogoWhite

0

OS-dependent. For DOS use functions kbhit and getch from conio.h

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What does CHAR means in Excel?

CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)CHAR is a function that returns a character from a number code. All letters and digits and other characters on your keyboard have special codes. If you know these codes, they can be used with the CHAR function to get the characters you want. Here are just a few examples.To get the letter a, you can type:=CHAR(97)To get the letter A, you can type:=CHAR(65)To get the digit 1, you can type:=CHAR(49)


What is a valid heading for the main program?

For a 'C' program, the main routine must be on of these:int main (void)int main (int argc, char ** argv)int main (int argc, char ** argv, char **envp) /* on some platforms */


How do you write a C program to copy to strings using pointers?

mystrcpy (char* dest, char* src) { while ((*dest++ = *src++) != '\0); }


Program to copy one string to another?

As usual, you should check official documentation before you ask a question like this. string.h // Copies num characters from source into destination. char* strncpy (char* destination, const char* source, size_t num); // Copies characters from source into destination. char* strcpy (char* destination, const char* source);


How do you use right equipment in working in the office?

before you go in to the office you have to make show that you need countable char, right keyboard


What is the return value of getch?

getch(); is used for unbuffered input. e.x: int main() { char num=0; printf("Press a keyboard button: "); num = getch(); //This brings in 1 character that the user pressed on the keyboard printf("\nYou pressed: %c", num); //This prints the character you pressed getchar(); // I am using getchar(); to stop the program from ending after pressing buttons return 0; } My input will be within the (). output: Press a keyboard button: (v) You pressed: v EOP //End of program I hope this has helped you!


Is char a identical to char a?

'char a' and 'char a' are identical.


Why does C forbid converting a string constant to 'char' ?

C forbids converting a string constant to 'char' because string constants are stored in read-only memory, and attempting to modify them through a 'char' pointer can lead to undefined behavior and potential program crashes.


What is the role of void in functions of c?

this is a void main()int, char, are execution the program and it is not return the void.


A c program which will remove all the spaces from a given string?

RemoveSpaces (char *str) { char *new = str; while (*str != '\0') { if (*str != ' ') *(new++) = *str; str++; } *new = '\0'; }


What must every c program have?

A main function must be present in every C program.


C program to concatenate without using strcat?

#include#include#includevoid main(){char str1[30],str2[30];int l1,l2,i;clrscr();gets(str1);gets(str2);l1=strlen(str1);l2=strlen(str2);for(i=0;i