Search Header Logo

C programming Quiz

Authored by Shital Ugale

Computers

University

Used 6+ 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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

There are ___ storage classes in C

2

4

6

8

Answer explanation

In C, there are 4 storage classes: auto, register, static, and extern. Each class defines the scope, visibility, and lifetime of variables, making '4' the correct answer.

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

The data type int uses ___ bytes of memory.

2

4

6

8

Answer explanation

The data type 'int' typically uses 2 bytes of memory in many programming environments, especially in older systems. Therefore, the correct answer is 2 bytes.

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

To show end of program ___ symbol used?

<

(

{

}

Answer explanation

The end of a program is typically denoted by the closing brace '}'. This symbol indicates the conclusion of code blocks in many programming languages, making it the correct choice for showing the end of a program.

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which is the incorrect form of variable?

sale20

Name

12Rno

Net_Salary

Answer explanation

The variable '12Rno' is incorrect because variable names cannot start with a digit. The other options 'sale20', 'Name', and 'Net_Salary' are valid variable names.

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the default C Storage Class for a variable?

static

auto

register

extern

Answer explanation

In C, the default storage class for a variable declared inside a function is 'auto'. This means the variable has automatic storage duration and is created and destroyed with the function's execution.

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

To find remainder _____ operator is use in C program

%

@

/

|

Answer explanation

In C programming, the '%' operator is used to find the remainder of a division operation. It returns the remainder after dividing one number by another, making it the correct choice for this question.

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

C program is save with _____ extension.

.a

.b

.c

.d

Answer explanation

C programs are saved with the .c extension, which is the standard file format for C source code. Therefore, the correct answer is .c.

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?