Week1

C Language Challenge Quiz
Test your knowledge of the C programming language with this engaging quiz! Whether you're a beginner or an expert, you'll find questions that challenge your understanding of C syntax, concepts, and fun
Join the fun and see how you rank against other programmers!
- 20 carefully curated multiple choice questions
- Explore various concepts including variables, loops, and static storage
- Immediate feedback and results
Who created C Language
Dennis Ritchie
Guido Van Rossum
Ken Thompson
Keanu Reeves
When was C language Created?
1954
1964
1972
1976
int main()
{
int n = 5;
while(n){
printf("%d ", n--);
}
}
5 4 3 2 1
5 4 3 2
4 3 2 1 0
4 3 2 1
int main() {
int n = 5;
while(n) {
printf("%d ", n);
}
}
int n = 5;
while(n) {
printf("%d ", n);
}
}
5 4 3 2 1
5 4 3 2
4 3 2 1
None of the above
int main()
{
int n = 5;
n = n=10 + n;
printf("%d ", n);
}
{
int n = 5;
n = n=10 + n;
printf("%d ", n);
}
20
15
10
Compiler Error
int main()
{
int n = 5;
n = n + n=10;
printf("%d ", n);
}
20
15
10
Compiler Error
int main() {
int n = 5;
n = 6*5+4-1*2%6+1;
printf("%d ", n);
}
32
67
1
None of the Above
int main() {
int n = 6;
n = n++ + n++ + n++;
printf("%d ", n);
}
21
20
23
22
int main()
{
int n = 6;
n = ++n + ++n + ++n;
printf("%d ", n);}
24
25
23
27
int main()
{
static int n = 6;
n = ++n + ++n + ++n;
printf("%d ", n);
}
24
25
26
27
Scope and lifetime of Static is till the program ends?
True
False
What does Static mean in C?
Variables can remember their previous instance.
Variables CANNOT remember their previous instance.
Default value of Static variables?
Garbage
-1
0
None of the Above
int main()
{
int y, k;
{
y = 10; int y = y;
k = y;
}
printf("%d ", k);
}
10
Compiler Error
Garbage
K
int main()
{
{ static int y = 10; }
printf("%d ", y);
}
10
Compiler Error
Garbage Value
0
static int y = 10;
int main()
{
printf("%d ", y);
}
10
Compiler Error
0
Garbage
Is it possible to print "hello world" without using a semiColon anywhere in the C program?
Yes
No
What does this program do??
int main()
{
char k; scanf("%c", &k);
switch(k){
case 'a': case 'e': case 'i': case 'o': case 'u': printf("Is a vowel!"); break;
default: printf("Is not a vowel");
}
}
{
char k; scanf("%c", &k);
switch(k){
case 'a': case 'e': case 'i': case 'o': case 'u': printf("Is a vowel!"); break;
default: printf("Is not a vowel");
}
}
Takes an input character and checks if it is not a vowel.
Takes an input character and checks if it is a vowel.
int main()
{
char k = 'k';
switch(k){
default: printf("O");
case 'i': printf("I");
case 'k': printf("K");
case 'm': printf("M");
}
}
KMO
K
KM
OIKM
//Is this Code Correct?
int main()
{
int a, b, c; scanf("%d%d%d", &a, &b, &c);
printf("%d", a>=b&&a>=c?a:b>=c?b:c );
}
Yes, prints the greatest of three numbers.
No, Logical Error.
{"name":"Week1", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of the C programming language with this engaging quiz! Whether you're a beginner or an expert, you'll find questions that challenge your understanding of C syntax, concepts, and functionality.Join the fun and see how you rank against other programmers!20 carefully curated multiple choice questionsExplore various concepts including variables, loops, and static storageImmediate feedback and results","img":"https:/images/course5.png"}
More Quizzes
Competitive programming - take the quiz
231241
JAVA
10526
C#
6374
Knowledge Check 4 Reviewer
35180
JAVA Quiz
201023
Programmers At War
10528
CrazyForCode
15812
Knowledge Check 5 Reviewer
603052
C - Program Quiz | HOWZIT AI Messenger | India public group chat appHOWZIT will present prizes to the winners
740
П��😈C PROGRAMMING QUIZ -2😈😈
1050
Data Structure Quiz
1059
COMPUTER PROGRAMMING
168210