NEW
Font size
WorksheetsFDS quiz 2
Total questions: 20
Worksheet time: 12mins
What is the output of C Program.?
int main()
{
int a=25;
while(a <= 27)
{
printf("%d ", a);
a++;
}
return 0;
}
25 25 25
25 26 27
27 27 27
Compiler error
Choose a right C Statement.
Loops or Repetition block executes a group of statements repeatedly.
Loop is usually executed as long as a condition is met.
Loops usually take advantage of Loop Counter
All the above.
What is the way to suddenly come out of or Quit any Loop in C Language.?
continue; statement
break; statement
leave; statement
quit; statement
Choose a correct C for loop syntax.
for(initalization; condition; incrementoperation) { //statements }
for(declaration; condition; incrementoperation) { //statements }
for(declaration; incrementoperation; condition) { //statements }
for(initalization; condition; incrementoperation;) { //statements }
Choose a correct C do while syntax.
dowhile(condition) { //statements }
do while(condition) { //statements }
do { //statements }while(condition)
do { //statements }while(condition);
C programs are converted into machine language with the help of
An Editor
A compiler
An operating system
None of these.
Which of the following is not a correct variable type?
float
real
int
char
The process of removing a bug is known as
Debugging
Compilation
Executing
Running
Which of the following is the boolean operator for logical-AND?
&
&&
|
||
Which of the following is not a valid variable name declaration?
int a3;
int 3a;
int _A3;
int a_3
All keywords in C are in ____________
Lowercase
Uppercase
Camelcase
None of these
Which is variable declaration?
int a,b;
c=a+b;
printf("%d%d",a,b)
scanf("%d%d",&a,&b);
#include<stdio.h> is important line in c. The stdio.h contains information on input output routines.
True
False
Library function pow() belongs to which header file?
mathio.h
math.h
square.h
stdio.h
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 5;
if (x < 1)
printf("hello");
if (x == 5)
printf("hi");
else
printf("no");
}
hi
hello
no
error
