Round 2- Syntax ShowDown

Round 2- Syntax ShowDown

University

25 Qs

quiz-placeholder

Similar activities

Alpha Research & Investment Quiz

Alpha Research & Investment Quiz

University

20 Qs

RECALL ON WEEK 6: BUILDING FOUNDATIONS & ELEMENTS

RECALL ON WEEK 6: BUILDING FOUNDATIONS & ELEMENTS

University

20 Qs

Rehab 105 Short Quiz 4 - Endterms

Rehab 105 Short Quiz 4 - Endterms

University

20 Qs

POSTEST RAKOR UNBK SUL-SEL

POSTEST RAKOR UNBK SUL-SEL

University - Professional Development

20 Qs

2_RMSME_sum2

2_RMSME_sum2

University

20 Qs

Japanese Anime Culture #ICTUSD2021

Japanese Anime Culture #ICTUSD2021

University

20 Qs

THE TIME VALUE OF MONEY  & INVESTMENT ANALYSIS

THE TIME VALUE OF MONEY & INVESTMENT ANALYSIS

University

20 Qs

Statistik (Modul 4)

Statistik (Modul 4)

University

20 Qs

Round 2- Syntax ShowDown

Round 2- Syntax ShowDown

Assessment

Quiz

Other

University

Practice Problem

Hard

Created by

Tharun Kumar

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?