MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In pseudocode how is a decision represented?
A
IF-THEN-ELSE
B
IF-OTHERWISE
C
WHEN-DO
D
None of the above
Explanation: 

Detailed explanation-1: -An IF statement starts with a condition which is tested. If the condition evaluates as TRUE then the THEN code block will be run. If the condition evaluates as false then the ELSE block will run.

Detailed explanation-2: -== means “is equal to". != means “is not equal to". A minus before a variable means 0 minus that variable. For example, -a means (0-a) .

Detailed explanation-3: -Writing in pseudocode is similar to writing in a programming language. Each step of the algorithm is written on a line of its own in sequence. Usually, instructions are written in uppercase, variables in lowercase and messages in sentence case.

Detailed explanation-4: -As for your question, both = and == are accepted answers, as long as it is clear to your reader what your intention is.

There is 1 question to complete.