Search Header Logo

C Programming Quiz

Authored by Riya Samanta

Information Technology (IT)

University

Used 7+ times

C Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is the correct syntax to print "Hello, World" in C?

echo("Hello, World");

printf("Hello, World");

cout << "Hello, World";

print("Hello, World");

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is a correct variable declaration in C?

int 1number;

float value;

char = 'A';

int; x

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of the following code? int a = 5; printf("%d", a++);

6

5

Error

Garbage value

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which keyword is used to define a constant in C?

const

constant

immutable

final

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the size of int on a 32-bit system (typically)?

2 bytes

8 bytes

4 bytes

1 byte

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is a correct comment in C?

# This is a comment

// This is a comment

-- This is a comment

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be the output of the code below? int x = 10; int y = 3; printf("%d", x / y);

3.33

3

0

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?