C basics

C basics

University

10 Qs

quiz-placeholder

Similar activities

งานประดิษฐ์ ม.6

งานประดิษฐ์ ม.6

University

10 Qs

Scratch

Scratch

KG - Professional Development

10 Qs

Bài tập trắc nghiệm C++(tiếp)

Bài tập trắc nghiệm C++(tiếp)

3rd Grade - University

10 Qs

Structured/Traditional SDM

Structured/Traditional SDM

University

9 Qs

 QUIZ  MS Core Java Quiz-3 2023

QUIZ MS Core Java Quiz-3 2023

University

11 Qs

PythonProgramming

PythonProgramming

University

15 Qs

QUIZ GAME

QUIZ GAME

University

10 Qs

Computers

Computers

12th Grade - University

15 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?

Discover more resources for Computers