WorksheetsUnit -2 : Assignment 1
Total questions: 10
Worksheet time: 5mins
Loops in C Language are implemented using.?
While Block
For Block
Do While Block
All the above
Which loop is faster in C Language, for, while or Do While.?
for
while
do while
All work at same speed
Choose correct C while loop syntax.
while(condition)
{
//statements
}
{
//statements
}while(condition)
while(condition);
{
//statements
}
while()
{
if(condition)
{
//statements
}
}
Choose a correct C Statement regarding for loop.
for loop works exactly first time
for loop works infinite number of times
Compiler error
None of the above
If block always need to be assoicated with a else block?
True
False
The conditional operator are also known as
Relational operator
Binary operator
Ternary operator
Arithematic operator
The continue statement cannot be used with ________
for
while
do while
switch
This Loop tests the condition after having executed the Statements within the Loop.
while
do-while
for loop
if-else-if
Which of the following statement about for loop is true?
Index value is retained outside the loop
Index value can be changed from within the loop
Goto can be used to jump, out of the loop
All of these
A switch statement is used to
To use switching variable
Switch between function in a program char
Switch from one variable to another variable
To choose from multiple possibilities which may arise due to different values of a single variable
