What the meaning of return 0 and getch in c programming and also is it important to include both #iclude<stdio.h> and

25th Dec 2016, 6:08 PM
Erick Sangi
Erick Sangi - avatar
2 Answers
+ 4
#include<iostream> is a library required for C++ to work , its something that gives functions to your system, so its a yes, required. return 0 in the main function is the same as exiting the system. Although it means to output a number (onto the system/function, not console) in other functions.
25th Dec 2016, 6:22 PM
Wen Qin
Wen Qin - avatar
+ 1
return 0 - returns the value 0 from current function to caller function. In the main() the value will be returned to system. But in most cases system ignores it getch() - C function. Waits until user press any key on a keyboard and return the key code. The last question isn't finished. If you mean iostream and stdio.h: Theese libraries contain different i/o functions. But iostream is preferred in C++
25th Dec 2016, 6:21 PM
Vladislav - avatar