
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
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Đề 1 CNTT

Quiz
•
University
20 questions
First Meet Sains Data 2022

Quiz
•
University
22 questions
Funções e Estruturas em Programação C - Parte I

Quiz
•
9th Grade - Professio...
30 questions
CODE4KITSW

Quiz
•
University
20 questions
CodeMavarick

Quiz
•
University
20 questions
TECHTRIX2025 BUGHUNT SET6

Quiz
•
University
20 questions
QUIZERIA

Quiz
•
University
20 questions
Chương 2

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade