COMPUTER PROGRAMMING FUNDAMENTALS
5 BASIC ELEMENTS OF PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Logical
|
|
Relational
|
|
Arithmetic
|
|
None of the above
|
Detailed explanation-1: -Explanation: Two arithmetic expressions can be compared with if statement, using Relational operator. In computer science, a relational operator is a programming language construct or operator that tests or defines some kind of relation between two entities. These include numerical equality and inequalities.
Detailed explanation-2: -Relational operators compare numeric, character string, or logical data. The result of the comparison, either true ( 1 ) or false ( 0 ), can be used to make a decision regarding program flow (see the IF statement).
Detailed explanation-3: -Relational or comparison operators are used to compare the values within an expression, such as to check if the value held by a variable matches the value held by another variable. Most operators use mathematical notation. The expressions in which these operators are applied evaluate to either True or False .
Detailed explanation-4: -The relational operators are often used to create a test expression that controls program flow. This type of expression is also known as a Boolean expression because they create a Boolean answer or value when evaluated.
Detailed explanation-5: -There are six relational operators used for data comparisons in C++. These operators must always appear between 2 literals, 2 variables, 2 arithmetic expressions, or a combination of these possibilities. The operators may be used with numbers, characters, or apstrings.