Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

what is get ch and return 0

0 votes
asked Sep 25, 2018 by anonymous

1 Answer

0 votes
answered Sep 25, 2018 by シリウス
Well, return 0 is just another way of saying that the program or method ran fine throughout its lifespan without any errors. This can be contrasted from a nonzero return type, which denotes that an error of some kind has occurred within your program or method;

The getch() method receives input from a user and then continues on with a program. you can assign a char variable to a getch() method and when the program is run and a character is pressed, the value of the character is assigned to the variable. However, using only the getch() method won't display the character on your console, so you can use the putch() method to output the specific character to the screen. Another way to do this is the getchar() method, which both gets the character and displays it immediately.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...