C++ Syntax Question:
Download Questions PDF

What is basic if statement syntax?


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 Interview Questions And Answers PDF

Previous QuestionNext Question
What relational operators if statements in C++?What is Else Syntax in C++?