C basics

C basics

University

10 Qs

quiz-placeholder

Similar activities

Input And Output in C

Input And Output in C

University

10 Qs

Python Basics

Python Basics

KG - University

15 Qs

ECE-C Quiz _3

ECE-C Quiz _3

University

10 Qs

PK (A) - PRE TEST 1

PK (A) - PRE TEST 1

University

10 Qs

Array in C

Array in C

University

10 Qs

KT giữa kì - NMLT

KT giữa kì - NMLT

10th Grade - University

14 Qs

Module 1 - Programming in C

Module 1 - Programming in C

University

15 Qs

C programming-1

C programming-1

University

13 Qs

C basics

C basics

Assessment

Quiz

Computers

University

Medium

Created by

Jeyantha 2696

Used 5+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?