Will the following program work? If not State errors and correct them?>
#include
main () { printf("How many person !");}
Answers
Is the programming language C++? If yes, then reply yes... I'll send you the corrections
"No, the program will not work.
There are mainly two errors in the given code. The compiler will report both errors which are syntax errors, during the process of compilations.
The first error is that nothing is included after writing the #include statement and inside the main function, the printf() function is giving output. The printf() function exists inside the stdio.h header file, so it is important to import stdio.h for using the printf() statement.
Secondly, the main() function does not have any return type written before it. At least void type should be written if the function is not returning anything."
"No, the program will not work.
There are mainly two errors in the given code. The compiler will report both errors which are syntax errors, during the process of compilations.
The first error is that nothing is included after writing the #include statement and inside the main function, the printf() function is giving output. The printf() function exists inside the stdio.h header file, so it is important to import stdio.h for using the printf() statement.
Secondly, the main() function does not have any return type written before it. At least void type should be written if the function is not returning anything."