Without the semi-colon, getch is just an expression, not a statement.
You must have misunderstood something.
explain about function call
There is no 'get' in the standard libraries, but for 'getc', 'getch', 'getchar', 'fgetc' etc you can find useful information in the help/manual.
Using TurboC? kbhit and getch are your friends
#include #include void main() { long 11; clrscr(); cout<<"size of long="< getch(); }
Use the scanf() function from the C standard library.
explain about function call
getch();
Gets one character (or keystroke) without buffering or echoing; beware: getch is not part of the standard library.
Function getche is Borland-specific function declared in conio.h, it does the some thing as getch, but echoes the character on the screen.
We use getch() function to hold the screen so that we can see the output but in real it is use to take a input of a character from the console window. Read this out -
Getting a character. Whenever you have a question regarding a function, you may use your system's help/manual system.
Function scanf for example. Or, for advanced users: fgets+sscanf
There is no 'get' in the standard libraries, but for 'getc', 'getch', 'getchar', 'fgetc' etc you can find useful information in the help/manual.
Using TurboC? kbhit and getch are your friends
conio.h is a library function which is predefined in the header file and 'clrscr();','getch();' and many other functions come under this.
#include #include void main() { long 11; clrscr(); cout<<"size of long="< getch(); }
Use the scanf() function from the C standard library.