NEW
Font size
WorksheetsQuiz on Basics of C
Total questions: 10
Worksheet time: 4mins
Select the wrong statement from the following
Int Var_Name = 10 ;
int _ = 10 ;
int varName = 10;
int Var_Name = 10;
#include <stdio.h>
int main() {
int x = 3;
if (x = 0)
printf("Hello");
else
printf("World");
return 0;
}
Select the output of code
Hello
World
Compiler Error
Undefined behavior
Select the correct statement from the following
float Var_Name = 10.5 ;
int 1stVar = 20 ;
double varName = 15.0;
char var-name = 'A';
#include <stdio.h>
int main() {
int z = 10;
if (z != 10)
printf("False");
else
printf("True");
return 0;
}
Select the output of code
Undefined behavior
Compiler Error
True
False
#include <stdio.h>
int main() {
int a = 5, b = 3;
printf("%d", a & b);
return 0;
}
What will be the output of the code
1
3
5
2
Select wrong keyword
int
char
string
double
#include <stdio.h>
int main() {
int a = 6;
printf("%d", a >> 1);
return 0;
}
Select the correct output
6
2
1
3
Decimal value of 1011
10
11
12
13
#include <stdio.h>
int main() {
int a = 3, b = 4, c = 5;
printf("%d", a || b && c);
return 0;
}
Output of the code
5
0
4
1
C Language is not a
Procedural Language
Middle level language
Object oriented Language
Functional language
