C Programming Quiz

C Programming Quiz

University

20 Qs

quiz-placeholder

Similar activities

Quiz Review SIMBAD (1-3)

Quiz Review SIMBAD (1-3)

University

15 Qs

PSY319: Chapters 4 and 6

PSY319: Chapters 4 and 6

University

18 Qs

Functions

Functions

7th Grade - University

25 Qs

Java

Java

11th Grade - University

23 Qs

DDL Motor de Almacenamiento

DDL Motor de Almacenamiento

University

20 Qs

Linked List Operations and Concepts

Linked List Operations and Concepts

University

16 Qs

PYTHON

PYTHON

University

22 Qs

Mastering C Language Concepts

Mastering C Language Concepts

University

25 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

Science

University

Hard

Created by

THANGA R

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of a NULL pointer in C?

0

1

-1

Undefined

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you represent the end of a linked list in C?

By setting the next pointer to 1

By setting the next pointer to NULL

By setting the next pointer to the first node

By setting the next pointer to -1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used in C to indicate that a function does not return any value?

int

void

return

NULL

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C, what is the correct way to declare a pointer to an integer?

int ptr

int *ptr

int &ptr

int ptr*

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about function pointers is true?

Function pointers cannot be assigned NULL.

Function pointers can only point to int type functions.

Function pointers can be passed as arguments to functions.

Function pointers are not allowed in C.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the return type of malloc() in C?

void

int

void*

char*

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you define optional parameters in C functions?

Using the opt keyword

Using pointers that can be NULL

Using void keyword

C does not support optional parameters

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?

Discover more resources for Science