C Programming Concepts

C Programming Concepts

University

13 Qs

quiz-placeholder

Similar activities

QUIZ ON INDEPENDANCEDAY

QUIZ ON INDEPENDANCEDAY

KG - University

15 Qs

PPGD PRAMJIB

PPGD PRAMJIB

12th Grade - University

10 Qs

Anong kwentong Raikan mo?

Anong kwentong Raikan mo?

KG - Professional Development

16 Qs

Quiz 1 sistem instalasi pemadam kebakaran

Quiz 1 sistem instalasi pemadam kebakaran

University

15 Qs

Dr. Vikram Sarabhai

Dr. Vikram Sarabhai

6th Grade - University

10 Qs

Hiểu biết về covid 19

Hiểu biết về covid 19

University

10 Qs

Guess the blackpink song lyrics

Guess the blackpink song lyrics

4th Grade - Professional Development

10 Qs

Questionnaire Design

Questionnaire Design

University

17 Qs

C Programming Concepts

C Programming Concepts

Assessment

Quiz

Other

University

Practice Problem

Hard

Created by

Guntha Vishnuvardhanreddy

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for declaring a variable in C?

variable_name = data_type;

data_type variable_name;

variable_name : data_type;

variable_name data_type;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between 'int' and 'float' data types in C?

int stores characters while float stores numbers

int can store negative numbers while float cannot

int is used for text data while float is used for numerical data

The main difference is that 'int' stores whole numbers, while 'float' stores numbers with decimal points.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the 'if-else' statement in C with an example.

Example: int num = 10; if(num > 5) { printf('The number is greater than 5'); } else { printf('The number is less than or equal to 5'); }

Example: int x = 5; if(x == 5) { printf('The number is equal to 5'); } else { printf('The number is not equal to 5'); }

The 'if-else' statement is used for looping in C.

Example: int num = 10; if(num < 5) { printf('The number is less than 5'); } else { printf('The number is greater than or equal to 5'); }

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of 'printf' function in C?

The purpose of 'printf' function in C is to create a new variable

The purpose of 'printf' function in C is to read input from the standard input

The purpose of 'printf' function in C is to print formatted output to the standard output.

The purpose of 'printf' function in C is to perform mathematical calculations

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare and initialize an array in C?

data_type array_name = {initialization_values};

array_name = new data_type[array_size];

data_type array_name[array_size] = {initialization_values};

array_name = malloc(array_size * sizeof(data_type));

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the concept of 'pointers' in C.

Pointers in C are used to store the value of another variable.

Pointers in C are variables that store the memory address of another variable. They are used to access and manipulate the memory directly, allowing for more efficient memory management and data manipulation.

Pointers in C are only used for accessing memory, not for manipulation.

Pointers in C are not compatible with other programming languages.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the use of 'malloc' function in C?

The 'malloc' function is used to sort arrays in C.

The 'malloc' function is used to allocate memory in C.

The 'malloc' function is used to print output in C.

The 'malloc' function is used to free memory in 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?