C Programming Quiz

C Programming Quiz

112 Qs

quiz-placeholder

Similar activities

AVB CUỐI KÌ 2

AVB CUỐI KÌ 2

11th Grade

110 Qs

"Arachne" Mastery Vocabulary

"Arachne" Mastery Vocabulary

7th Grade

110 Qs

Placement Test

Placement Test

1st - 5th Grade

114 Qs

E9 - LUYỆN 10 - PRONUNCIATION

E9 - LUYỆN 10 - PRONUNCIATION

9th Grade

114 Qs

E8- UNIT 4- SBT

E8- UNIT 4- SBT

8th Grade

117 Qs

[4I3] Present Perfect Tense - Quick check 10/03/2025

[4I3] Present Perfect Tense - Quick check 10/03/2025

5th Grade

110 Qs

Subject Pronoun

Subject Pronoun

3rd - 12th Grade

107 Qs

Ôn HSG cấp huyện TA9

Ôn HSG cấp huyện TA9

9th Grade

107 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

English

Medium

Created by

Anh Tuan

Used 4+ times

FREE Resource

112 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following C code? int x = 10; int y = 3; printf("%d", x / y);

3

3.33

2

1

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to declare a pointer to a constant integer in C?

const int *ptr;

int *const ptr;

const *int ptr;

int *ptr const;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the goto statement in C?

To create an infinite loop

To jump to a specific part of the program

To stop the program execution

To define a function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to include a user-defined header file in C?

#include "filename"

#include

#import "filename"

#import

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true about the continue statement in C?

It terminates the current loop and exits from the program.

It skips the remaining part of the current loop iteration and continues with the next iteration.

It jumps to the start of the function.

It pauses the program execution.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to allocate memory for a single integer dynamically in C?

int *ptr = malloc(sizeof(int));

int ptr = malloc(sizeof(int));

int *ptr = malloc(1 * sizeof(int));

Both A and C are correct

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code in C? int x = 5; int y = 3; printf("%d", x > y);

1

0

5

3

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?