Quiz
Question : Why main function is special in C++ ? Show/Hide the answer. Answer : Whenever a C++ program is executed, execution of the program starts and ends at main(). The main is the driver function of the program. If it is not present in a program, no execution can take place. Question : What is run-time error, logical error and syntax error? Show/Hide the answer. Answer : Syntax error - The errors which are traced by the compiler during compilation, due to wrong grammar for the language used in the program, are called syntax errors. For example, cin<<a; // instead of extraction operator insertion operator is used. Run time Error - The errors encountered during execution of the program, due to unexpected input or output are called run-time error. For example - a=n/0; // division by zero Logical Error - These errors are encountered when the program does not give the desired output, due to wrong logic of the program. For example : rema...