MABS Institution
11th Computer Applications Monthly Test -3 ( Control Structure in Javascript )-Aug 2020
-
-
-
-
-
-
The _____________ structure can be at the end of a switch structure if the result of the expression that do not match any of the case labels.
default
break
continue
None of these
-
In Javascript each part of the for structure operated by
,
.
;
-
The if statement has______________ forms.
two
three
four
five
-
____________ statement is a branching statement.
if.. else
else if
switch
All the above
-
Which of the following statement used commonly within switch to exit if choice is found?
break
case
default
lable
-
The same portion of coole needs to be excuted many times is called
brancing
selections
loops
conditional brancing
-
The switch statement beings by evaluating an expression placed between
{ }
< >
[ ]
( )
-
The ________________ statement evaluates an expression and executes one of two pieces of code, dending on the outcome.
if.. else
else if
switch
All the above
-
else if is also called
nested if
logical if
conditional if
aitemate if
-
Which of the following statement will skip back to the loop condition cheek?
switch
break
continue
default
-
How many parts are there in Javascript for structure?
4
3
2
6
-
The first part of the loop initialize a variable which is also called as _______________ variable.
Control
Local
Global
None of these
-
Which of the following is not a branching statement?
Loop
If-else
Switch
For
-
The _____________ statement terminates the loop irrespective of the condition.
break
continue
for
do..while
-
In for loop, the first part of the loop ____________ a variable.
Initialize
Test
Alter
All the above
-
The __________ statement will skip back to the loop condition check.
continue
break
goto
None of these
-
In a ____________ loop, first condition will be evaluated and then only. based on the result of the condition the body of the loop will be executed or not.
for
while
do..while
Both A and B
-
The ______________ loop is a very rigid structure that loops for a pre-set number of times.
for
while
do..while
All the above
-
Which of the following is not a looping statement?
Switch
While
Do-While
For
-
How many types of looping statements in Javascript?
4
3
2
many
-
In _________________ loop statement, the condition is evaluated before executing the statement.
for
while
do..while
Both A and B
-
The for structure in Javascript enclosed with?
( )
{ }
< >
[ ]
-
The for structure parts are separated by _____________.
Comma
Colon
Semicolon
None of these
-
The ________ statement executes the next iteration of the loop.
break
continue
for
do..while
-
< script type = "text / javascript" >
x=6+3 ;
document write (x);
< script > what will be the output?6
9
63
Error
-
Which of the following statement is true!
(i) The else if statement to specify a new condition if the first condition is false
(ii) The if else statement processing must follow one of two pathsonly (i)
only (ii)
both (i) and (ii)
both are wrong
-
The for structure within parenthesis there are _____________ parts.
two
three
four
five
-
______________ is a transfer of controi from the current statement to another statement or construct in the program unit.
Branching Selection
Looping / repetitive
Selection
Both A and C
-
Which of the following statement is true?
(i) Branching do not transfer control from one statement to another
(ii) A branch alters the execution sequence
(iii) There are four type of control statementsonly (iii)
only (i)
only (ii)
both (ii) and (iii)
-
Which statement in switch case is used to exit the statement once the appropriate choice is found?
Exit
Default
Case
Break
-
Which of the following alters the execution sequence?
loop
break
default
branch
-
Which of the following statement is true?
(i) In while loop, the condition is evaluated befo-e execution of the block
(ii) In do-while loop, the condition is tested at the end of the loop
(iii) In for loop, the condition is evaluated before execution of the blockonly (i)
both (i) and (iii)
only (iii)
all of these
-
In which loop the condition is evaluated, before executing a statement?
While
Do while
Break
Continue
-
Which of the following statement is the fundamental control statements?
if-else
else-if
switch
none of these
-
Which of the following is only for true condition?
if-else
if
else-if
switch
-
_____________ is a series of if statements.
if.. else
else if
switch
All the above
-
JavaScript supports _____________ kinds of looping statement,
for
while
do..while
All the above
-
Which of the following statement is an alternate to using if-else structure in Javascript?
do-while
else if
switch
if
-
In ______________ loop statement, the condition is evaluated after executing the statement.
for
while
do..while
Both A and B
-
Which conditional statement is used to transfer control from current statement to another statement?
Branching
Sequencing
Looping
Interating
-
How many times the following loop executed?
a)for (i=0 ; i< =5; i++) {if (i=2 break;}5
6
4
2
-
When the ______________ statement is executed, the current iteration of the enclosing loop is terminated and the next iteration begins.
continue
break
goto
None of these
-
What will be the output for the following snippet:
For (var n=0; n < 10; n+1)
{
if (n==3)
{
break;
}
document write (n+"< br >");
}0 1 2
0 1 2 3
0 1 2 3 4
0, 1, 3
-
The _______ statement is especially useful when testing all the possible results of an expression.
While
Do while
Switch
If
-
What if if statement and write its types.
-
Differentiate between while and do while statements
-
What is called a loop and what are its types?
-
Write the syntax for else-if statement.
-
Write script for the following criteria.
-
What message will be displayed, if the input for age is given as 20, for the following snippet.
if (age > = 18 ){
alert ("you are eligible to get Driving licence"}
}
else
alert ("you are not eligible to get driving licence");
}
-
What are the functions of the for loop parts?