Search Header Logo

C Programming Essentials

Authored by laksh jain

Information Technology (IT)

Professional Development

C Programming Essentials
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

30 sec • 1 pt

What are the basic data types in C?

boolean

string

array

int, float, double, char, void

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare an integer variable in C?

float myVariable;

integer myVariable;

myVariable int;

int myVariable;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the size of a float data type in C?

16 bytes

4 bytes

8 bytes

2 bytes

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the difference between signed and unsigned data types.

Signed data types can only represent positive values; unsigned data types can represent both negative and positive values.

Signed data types can represent negative and positive values; unsigned data types can only represent non-negative values.

Signed data types are used for floating-point numbers; unsigned data types are used for integers.

Both signed and unsigned data types can represent negative values, but signed types are larger.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'sizeof' operator in C?

The 'sizeof' operator compares two variables for equality.

The 'sizeof' operator is used to declare new data types.

The 'sizeof' operator is used to allocate memory dynamically.

The 'sizeof' operator returns the size of a data type or variable in bytes.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a constant in C?

Defining with 'let'

Using 'static' keyword

You can define a constant in C using 'const' or '#define'.

Declaring with 'var'

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a control structure in C?

A control structure in C is a construct that controls the flow of execution in a program.

A control structure in C is a library for managing memory.

A control structure in C is a function that returns a value.

A control structure in C is a type of variable.

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?