Mastering C Programming Concepts

Mastering C Programming Concepts

12th Grade

15 Qs

quiz-placeholder

Similar activities

Latihan Soal Informatika

Latihan Soal Informatika

8th Grade - University

17 Qs

Pengenalan Arduino

Pengenalan Arduino

12th Grade

15 Qs

soal microsoft word

soal microsoft word

9th - 12th Grade

20 Qs

BAB 6 ANALISIS DATA B. Perkakas Pengolah Lembar Kerja

BAB 6 ANALISIS DATA B. Perkakas Pengolah Lembar Kerja

7th Grade - University

20 Qs

Materi Hosting untuk Siswa Kelas 12 TKJ

Materi Hosting untuk Siswa Kelas 12 TKJ

12th Grade

20 Qs

Kuis Sistem Terdistribusi

Kuis Sistem Terdistribusi

1st Grade - University

20 Qs

Parcial 1 Reparación y Soporte- 5to BACO - I Unidad Forma A

Parcial 1 Reparación y Soporte- 5to BACO - I Unidad Forma A

10th Grade - University

13 Qs

Quiz 4 - Informatika

Quiz 4 - Informatika

12th Grade

17 Qs

Mastering C Programming Concepts

Mastering C Programming Concepts

Assessment

Quiz

Information Technology (IT)

12th Grade

Practice Problem

Medium

Created by

2024CS157798 Annah Musenya Komu

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...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the basic data types available in C?

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.

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?