C++ Syntax Question:
Download Job Interview Questions and Answers PDF
What is basic if statement syntax?
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";
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 Question | Next Question |
What relational operators if statements in C++? | What is Else Syntax in C++? |