C++ Syntax Question:

What is basic if statement syntax?

Tweet Share WhatsApp

Answer:

The structure of an if statement is as follows:
if ( TRUE )
Execute the next statement

Here is a simple example that shows the syntax:
if ( 5 < 10 )
cout<<"Five is now less than ten, that's a big surprise";

Download Basic C++ Syntax PDF Read All 27 Basic C++ Syntax Questions
Previous QuestionNext Question
What relational operators if statements in C++?What is Else Syntax in C++?