C Programming: Input and Output

C Programming: Input and Output

University

20 Qs

quiz-placeholder

Similar activities

C - Strings

C - Strings

University

20 Qs

Programming Concepts in C - Quiz-II

Programming Concepts in C - Quiz-II

University

20 Qs

C que que que

C que que que

University

23 Qs

Repaso progrmación 1

Repaso progrmación 1

University

15 Qs

การเขียนโปรแกรมมาตรฐานเปิด

การเขียนโปรแกรมมาตรฐานเปิด

10th Grade - University

20 Qs

Common errors in C programming

Common errors in C programming

University

15 Qs

TECHNOWIZ'S QUIDDITCH

TECHNOWIZ'S QUIDDITCH

University

25 Qs

ROUND 1

ROUND 1

University

20 Qs

C Programming: Input and Output

C Programming: Input and Output

Assessment

Quiz

Computers

University

Medium

Created by

Nursyahirah Tarmizi

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'printf' function in C programming?

The purpose of the 'printf' function is to read user input.

The purpose of the 'printf' function is to print formatted output.

The purpose of the 'printf' function is to perform mathematical calculations.

The purpose of the 'printf' function is to create loops in the program.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which header file should be included to use the 'scanf' function in C programming?

string.h

stdio.h

math.h

stdlib.h

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the format specifier for printing an integer in decimal format using 'printf'?

%s

%i

%f

%d

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you read a character from the user using 'scanf'?

scanf('%d', &ch)

scanf('%s', &ch)

scanf('%f', &ch)

scanf("%c", &ch)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'getchar' function in C programming?

To read a single character from the standard input and return its hexadecimal value.

To read a single character from the standard input and return its Unicode value.

To read a single character from the standard input and return its binary value.

To read a single character from the standard input and return its ASCII value.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the format specifier for printing a floating-point number using 'printf'?

%f

%d

%s

%c

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you read a string from the user using 'scanf'?

scanf(str);

scanf("%s", str);

scanf('%s', str);

scanf(str, '%s');

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?