C Programming Quiz

C Programming Quiz

University

10 Qs

quiz-placeholder

Similar activities

CSA Africa Python Workshop

CSA Africa Python Workshop

University

10 Qs

Cryptography Quiz

Cryptography Quiz

University

10 Qs

Refresh Python

Refresh Python

University

10 Qs

Dasar Python

Dasar Python

University

13 Qs

Mastering Python Loops, Functions, and Lists

Mastering Python Loops, Functions, and Lists

University

8 Qs

Python Programming Quiz

Python Programming Quiz

University

13 Qs

IT01

IT01

University

11 Qs

C Basic_Questions_1

C Basic_Questions_1

University

10 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

Information Technology (IT)

University

Medium

Created by

Riya Samanta

Used 7+ times

FREE Resource

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

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?