FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
You have written a program that asks the user for a number and then multiplies the number by 2, ten times before the program ends. Which type of control structure is this?
A
Object
B
Selective
C
Loop
D
Functional
Explanation: 

Detailed explanation-1: -For example, a do-while loop illustrates a control structure, where the programmer instructs the loop to iterate some process for a given number of instances. The variable is set at a certain point, and set to increase on each iteration, until, when it hits a given threshold, the loop is complete and it stops.

Detailed explanation-2: -In selection control structures, conditional statements are features of a programming language which perform different computations or actions depending on whether a programmer-specified Boolean condition evaluates to true or false.

Detailed explanation-3: -The for loop in most programming languages (including JavaScript) is used when you have a “definite” number of times to iterate: you know at the start of the loop that you want to repeat 10 times (or n times with a value in a variable).

There is 1 question to complete.