#include<stdio.h>
int main()
{
int a = 5
printf("%d", a);
return 0;
}
What’s the error?
Round 2- Syntax ShowDown
Quiz
•
Other
•
University
•
Hard
Tharun Kumar
Used 5+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
#include<stdio.h>
int main()
{
int a = 5
printf("%d", a);
return 0;
}
What’s the error?
Missing semicolon after int a = 5
Missing return statement
Wrong format specifier
No error
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
#include<stdio.h>
int main()
{
int num = 10;
if(num = 5)
{
printf("Equal");
}
return 0;
}
What’s the error?
if condition should use == instead of =
Missing else block
No semicolon after if
No error
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
#include<stdio.h>
int main()
{
int a = 5, b = 0;
printf("%d", a/b);
return 0;
}
What’s the error?
Division by zero
Missing semicolon
Wrong format specifier
No error
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
#include<stdio.h>
int main()
{
int a;
scanf("%d", a);
return 0;
}
What’s the error?
Missing & before a in scanf
Missing format specifier
Missing semicolon
No error
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
#include<stdio.h>
int main()
{
char str[10] = "Hello World";
printf("%s", str);
return 0;
}
What’s the error?
String too long for array
Missing semicolon
No null character
No error
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
#include<stdio.h>
int main()
{
int a = 5;
int b = 0;
if(b)
{
printf("Zero");
}
return 0;
}
What’s the error?
if(b) will never run since b = 0
Wrong if syntax
printf missing
No error
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
#include<stdio.h>
int main()
{
int x = 10;
switch(x)
{
case 10:
printf("Ten");
case 20:
printf("Twenty");
default:
printf("Other");
}
return 0;
}
What’s the error?
Missing break statements
Missing printf
Wrong switch syntax
No error
30 questions
ICE1111 Revision
Quiz
•
University
20 questions
IEEE CTS Quiz
Quiz
•
University
26 questions
Python Quiz SE 27/10/2023
Quiz
•
University
25 questions
EXAM MMI
Quiz
•
University
20 questions
QUIZ WEEK 6
Quiz
•
University
30 questions
Webathan
Quiz
•
University
26 questions
python programming quiz
Quiz
•
12th Grade - University
30 questions
Tech quiz
Quiz
•
University
15 questions
Multiplication Facts
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
5 questions
capitalization in sentences
Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions
Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines
Quiz
•
Professional Development
12 questions
Dividing Fractions
Quiz
•
6th Grade