What are the basic data types available in C?

Mastering C Programming Concepts

Quiz
•
Information Technology (IT)
•
12th Grade
•
Medium
2024CS157798 Annah Musenya Komu
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
string
array
boolean
int, float, double, char, void
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the difference between '==' and '===' in C.
'==' is used for assignment, while '===' is for comparison
'==' allows type coercion, while '===' does not.
Both '==' and '===' are identical in functionality
'==' is faster than '==='
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a function in C and how is it defined?
A function in C is a reusable block of code defined with a return type, name, and parameters.
A function in C is defined only with a name and no return type.
A function in C is a single line of code without parameters.
A function in C is a type of variable that stores data.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Describe recursion and provide an example in C.
int fibonacci(int n) { if (n <= 1) return n; return fibonacci(n + 1); }
int sum(int n) { return n + sum(n - 1); }
int factorial(int n) { if (n == 0) return 1; return n * factorial(n - 1); }
int power(int base, int exp) { if (exp == 1) return base; return base * power(base, exp + 1); }
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a pointer in C and how is it used?
A pointer in C is a variable that holds the address of another variable, used for direct memory access and manipulation.
A pointer in C is a variable that stores a string of characters.
A pointer in C is used exclusively for file handling operations.
A pointer in C is a type of function that returns a value.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you allocate memory dynamically in C?
Use printf() to allocate memory.
Use malloc(), calloc(), or realloc() functions from stdlib.h to allocate memory dynamically.
Use strcpy() to allocate memory.
Use free() to allocate memory.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'fopen' function in file handling?
To close an already opened file.
To delete a file from the system.
To open a file for reading or writing.
To create a new file without opening it.
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Quiz aula 6

Quiz
•
9th - 12th Grade
20 questions
Fase E. KK3 12 TKJ Pengelolaan Email di cPanel

Quiz
•
12th Grade
20 questions
Quizz Informatika Analisis Data Kelas 9

Quiz
•
9th Grade - University
10 questions
Quiz in ICT 9

Quiz
•
9th - 12th Grade
10 questions
Soal Pilihan Ganda tentang Instalasi VirtualBox dan Debian 11

Quiz
•
12th Grade
13 questions
การเขียนโปรแกรม C เบื้องต้น

Quiz
•
12th Grade
10 questions
Parts of a Computer: Operating System Functions

Quiz
•
9th Grade - University
20 questions
KILAS BALIK MATERI SEBELUMNYA

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University