106k views
1 vote
Consider the following C++ program. #include using namespace std; int main() { cout << "Hello World " return 0; } In the cout statement, the missing semicolon in the code above will be caught by the?

1 Answer

3 votes

Answer:

Compiler.

Step-by-step explanation:

Actually there are two things missing in the code first is the header file.There is only # include no filename is there like<iostream>,,bits/stdc++.h> etc.cin ,cout will not work until iostream is included in the program.After including the header properly the missing semicolon will be caught by the compiler.The error will be as following:-

expected ';' before return.

User Adrian Kurzeja
by
4.3k points