Printf Scanf Quiz

Printf Scanf Quiz

Professional Development

10 Qs

quiz-placeholder

Similar activities

BrightChamps Technical Round - C language

BrightChamps Technical Round - C language

Professional Development

15 Qs

Cycle 4: Lesson 11 Review.

Cycle 4: Lesson 11 Review.

Professional Development

13 Qs

ตัวแปรและประเภทข้อมูลในภาษาC

ตัวแปรและประเภทข้อมูลในภาษาC

Professional Development

10 Qs

C String Array MCQs

C String Array MCQs

Professional Development

10 Qs

3D Printing Using Tinkercad

3D Printing Using Tinkercad

6th Grade - Professional Development

10 Qs

Java Fundamentals

Java Fundamentals

Professional Development

11 Qs

Data Science Basics

Data Science Basics

Professional Development

10 Qs

ECDL/ICDL Computer Essentials

ECDL/ICDL Computer Essentials

KG - Professional Development

15 Qs

Printf Scanf Quiz

Printf Scanf Quiz

Assessment

Quiz

Computers

Professional Development

Practice Problem

Hard

Created by

Zohaib Hasan

Used 2+ 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

45 sec • 1 pt

What will be printed?

printf("%10.1f", 4.6785);

4.7 after 7 spaces

4.6 after 8 spaces

4.6785 after 7 spaces

4.6785 after 10 spaces

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be printed?

printf("%10d", 45);

45 after 10 spaces

45 after 8 spaces

45 with no spaces before

45 after 7 spaces

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be printed?

printf("%0*d %0*d", 5,6,5,8);

00005 00008

5 8

5 6 5 8

Compilation Error

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be printed?

printf("%d %d", '0', '1');

0 1

48 49

'0' '1'

Compilation Error

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be printed if input is 4 456?

int a,b;

scanf("%d %2d", &a, &b);

printf("%d %d", a , b);

4 456

4 45

4 4

4 6

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be printed? (underscore in option shows spaces)

printf("%-7ddvr%5d",264,32);

264____dvr___32

264__dvr_32

264_______dvr_____32

264_______32

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be the output if the value of 'a' is entered 0x23?

int a;

scanf("%i", &a);

printf("%x", a);

0x23

23

0

Compilation Error

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?