C Formatted scanf

C Formatted scanf

University

5 Qs

quiz-placeholder

Similar activities

Digital ELectronics 1

Digital ELectronics 1

University

10 Qs

Braille Vocabulary

Braille Vocabulary

8th Grade - University

9 Qs

Introduction to C Programming

Introduction to C Programming

University

10 Qs

Post-Test Modul 1 (A)

Post-Test Modul 1 (A)

University

10 Qs

Six Pillars of Character

Six Pillars of Character

KG - University

7 Qs

Second set

Second set

University

10 Qs

C Functions-printf and scanf

C Functions-printf and scanf

University

5 Qs

Computer Quiz

Computer Quiz

1st Grade - Professional Development

10 Qs

C Formatted scanf

C Formatted scanf

Assessment

Quiz

Other

University

Medium

Created by

Azrinna Muhamad

Used 5+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the following code, what will be the input format for the integer values?

int a, b;

scanf("%3d %4d", &a, &b);

First integer takes 3 digits, second integer takes 4 digits

Both integers take 3 digits

Both integers take 4 digits

No specific digit limit

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct format specifier for reading a floating-point number?

%d

%f

%c

%s

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Integer input

Floating-point input

Character input

String input

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

scanf("%c", character);

scanf("%c", &character);

scanf("%d", &character);

scanf("%s", &character);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The program will read up to 10 characters, including the null terminator.

The program will read up to 9 characters and automatically add a null terminator.

The program will read exactly 9 characters without a null terminator.

The program will only read numbers.