+ 1
What is the difference between return 0 and getch()
7 Respostas
+ 4
A bit like the difference between a thumbs up and an open palm.
+ 1
Include the language you're using in tags please.
+ 1
getch() takes a space in the memory while return 0 takes no memory
getch () means to freeze the output on the screen while return 0 means it returns '0' to the function also it symbolises the end of code in c++.
+ 1
Return 0; is used as the function termination(end of a function). Getch() is a function in the conio.h header file that accepts single character user input without printing it onto the screen.
It is used for the " press any key to continue.." Kind of situations in coding. Getch() pauses the execution of the rest of the program until the user presses any key on the keyboard. If you want to store which key the user pressed, then: char userInput = getch(); is used.
0
C language
0
Return 0...is just a confirmation that u have wrote ur program correctly with no mistakes
Getch() ......accepts character from user.
0
Thank you