Unit 3 I/O functions

Unit 3 I/O functions

University

5 Qs

quiz-placeholder

Similar activities

Perangkat komputer

Perangkat komputer

University

10 Qs

Logika Fuzzy

Logika Fuzzy

University

10 Qs

BB

BB

University

10 Qs

Tree and Planar Graph

Tree and Planar Graph

University

10 Qs

CodeMonkey for B.Ed IT

CodeMonkey for B.Ed IT

University

10 Qs

JRB2 Quiz 4

JRB2 Quiz 4

University

10 Qs

TOOLS FOR AD & TECHNOLOGY DEVELOPMENT (W4-W6)

TOOLS FOR AD & TECHNOLOGY DEVELOPMENT (W4-W6)

University

10 Qs

Understanding Email, Contacts and Calendaring

Understanding Email, Contacts and Calendaring

University

10 Qs

Unit 3 I/O functions

Unit 3 I/O functions

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Abhishek Pandey

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to input an integer using scanf?

scanf("%s", &num);

scanf("%f", &num);

scanf("%d", &num);

scanf("%c", &num);

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct format specifier to print a string in C using printf?

%d

%o

%c

%s

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the scanf function, why is the address-of operator (&) used?

To specify the type of input

To store the input in a variable

To pass the variable's memory address

To terminate the input

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to print a floating-point number with 2 decimal places in C?

printf("%.2f", num);

printf("%2f", num);

printf("%f.2", num);

printf("%2f", num);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following format specifiers can be used to print an integer value in hexadecimal format?

%o

%i

%x

%d

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?