C basics

C basics

University

10 Qs

quiz-placeholder

Similar activities

Revision Gr2-2025

Revision Gr2-2025

3rd Grade - University

12 Qs

Pengantar Coding

Pengantar Coding

University

10 Qs

OOP 1 Undiksha

OOP 1 Undiksha

12th Grade - University

13 Qs

HTML DOJO 1

HTML DOJO 1

University

10 Qs

KUIS MODUL 1 SIL 2022 - Pengembangan Sistem Informasi

KUIS MODUL 1 SIL 2022 - Pengembangan Sistem Informasi

University

10 Qs

UNIT-1 PYTHON BASICS

UNIT-1 PYTHON BASICS

University

10 Qs

PYTHON LOOPING

PYTHON LOOPING

University

10 Qs

Introduction to Business Process

Introduction to Business Process

University

10 Qs

C basics

C basics

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Jeyantha 2696

Used 7+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You need to store the number of students and their average marks. Which declaration is best?

float students; int avgMarks;

int students; float avgMarks;

char students; float avgMarks;

double students; char avgMarks;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is wrong with this program?

scanf should use %d instead of %f

age should be float

printf should come after scanf

No error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of this code?

10

20

1

0

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

This code compiles but crashes: What’s wrong?

Wrong format specifier

Missing return statement

scanf missing & operator

Cannot read two inputs

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Why does this code compile but produce no output?

No input

main is empty

printf() is missing

Code is invalid

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are identifiers in C?

Names used to identify variables, functions, arrays, etc.

Special symbols used to perform operations

Predefined keywords in the C language

Numbers used for looping

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What number will z in the sample code given below?

int z, x = 5, y = -10, a = 4, b = 2;

5

6

9

10

Access all questions and much more by creating a free account

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?