Basics of C Quiz

Basics of C Quiz

9th - 12th Grade

8 Qs

quiz-placeholder

Similar activities

Python Loops

Python Loops

9th - 12th Grade

10 Qs

CHALLEMGE SUPERIOR

CHALLEMGE SUPERIOR

9th - 12th Grade

10 Qs

CMU CS Academy Unit 2 Part 6 Global Variables and Scope

CMU CS Academy Unit 2 Part 6 Global Variables and Scope

9th Grade

11 Qs

Programming

Programming

1st - 10th Grade

10 Qs

H466 - Global and Local Variables

H466 - Global and Local Variables

12th Grade - University

10 Qs

XII - CS - Lesson 7 - Function - Quiz 3

XII - CS - Lesson 7 - Function - Quiz 3

12th Grade

10 Qs

Roblox Lua Scripting Quiz

Roblox Lua Scripting Quiz

1st - 12th Grade

8 Qs

Java Scope mini quiz

Java Scope mini quiz

9th - 12th Grade

9 Qs

Basics of C Quiz

Basics of C Quiz

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Aaditya Dahal

Used 1+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the syntax for declaring a variable in C?

data_type variable_name;

variable_name data_type;

int variable_name;

variable_name = data_type;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the difference between 'while' and 'do-while' loop in C.

The 'while' loop checks the condition before executing the code inside the loop, while the 'do-while' loop executes the code inside the loop at least once before checking the condition.

The 'while' loop and 'do-while' loop both check the condition before executing the code inside the loop

The 'while' loop executes the code inside the loop at least once before checking the condition, while the 'do-while' loop checks the condition before executing the code inside the loop

The 'while' loop and 'do-while' loop both execute the code inside the loop at least once before checking the condition

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the use of 'typedef' keyword in C?

To include a library

To declare a new variable

To define a function

To create an alias for data types

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the concept of 'array' in C.

An array in C is a data structure used to store a collection of elements of the same data type.

An array in C is a function that points to a specific memory location.

An array in C is a variable that stores the memory address of another variable.

An array in C is a variable that stores the value of another variable.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the difference between 'local' and 'global' variables in C.

Local variables are declared inside a function and can only be accessed within that function, while global variables are declared outside of any function and can be accessed by any function in the program.

Local variables are declared outside of any function and can be accessed by any function in the program, while global variables are declared inside a function and can only be accessed within that function.

Local variables are declared inside a function and can only be accessed within that function, while global variables are declared inside a function and can be accessed by any function in the program.

Local variables are declared outside of any function and can be accessed by any function in the program, while global variables are declared outside of any function and can only be accessed within that function.

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

10 40

40 20

30 40

40 40

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

0 2 5

0 2 4 5

0 2 4

0 4

8.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

3

Infinite recrusion

5

-2