+ 5

What is the difference between getch() and return

https://code.sololearn.com/W1XZzqVj1u8t/?ref=app

8th Dec 2019, 5:03 PM
Rohit kumar
5 Answers
+ 10
--> getch() is a predefined function Declared in conio.h header file. This function is used to take a Single Character from User on Output (Console) Screen. --> return is a keyword used to return a value to,from where function is Called.
8th Dec 2019, 5:37 PM
ROHIT KANOJIYA
ROHIT KANOJIYA - avatar
+ 6
First tell me why did you share others code with your question? As it seems you are new here so please next time don't share if there is no relationship with your question. getch is a function that will wait for input and then read this input. It is often used at the end of programs to make sure the window you run it in doesn't close immediately. You can however use it to read input.  return is a statement used to return a value at the end of a function.
8th Dec 2019, 5:13 PM
A͢J
A͢J - avatar
+ 5
Thank you "I don't know how to share so i make mistake sorry
8th Dec 2019, 5:23 PM
Rohit kumar
+ 3
Rohit kumar No problem. Learn from mistake.
8th Dec 2019, 5:32 PM
A͢J
A͢J - avatar
+ 3
When we work with computer in dev++ for example and when we compilate , it passes very quickly also the same for run so getch comes to block the screen in order to help the coder seeing the compilation and running and verify and testing the code if it is true on no getch is defined in conio.h header But return is about returning a value !!!!
9th Dec 2019, 10:29 PM
Jong Oum
Jong Oum - avatar