C Programming Language

445 questions in the bank
Are you ready to take quiz?
Explore more
Logo
About the Quiz

Quiz will ask 20 randomly selected questions with allotted time of . You can take the quiz more than once. Once you submit the quiz, you can review how you have done, the correct the answers for each questions and the explanation for the correct the answer.

Quiz Topics

9 Modules

Concurrency and Multithreading

5 topics
1.

Mutexes and Semaphores

9 questions
2.

Race Conditions

10 questions
3.

Thread Safety

10 questions
4.

Threads and Processes

10 questions
5.

Using pthreads Library

10 questions

Advanced Topics

5 topics

Error Handling

5 topics

Preprocessor Directives

5 topics

File I/O

5 topics

Structures and Unions

5 topics

Arrays and Strings

5 topics

Pointers and Memory Management

5 topics

Basic Syntax and Structure

5 topics
Sample questions

Which of the following are valid variable names in C?

1stVariable

_variable

variable-name

variableName

What is the output of the following code snippet?

int main() {
    int a = 5;
    int b = 10;
    printf("%d", a + b);
    return 0;
}

5

10

15

Compilation Error

Which of the following data types can store a decimal value in C?

int

float

double

char

What will be the result of the following code?

int main() {
    char c = 'A';
    printf("%d", c);
    return 0;
}

65

A

1

Compilation Error

Which of the following statements about pointers is true?

A pointer can hold the address of any data type.

Pointers can only point to int data types.

Pointers must be dereferenced before use.

A pointer variable must be declared before it can be used.

Quiz Topics

9 Modules

Concurrency and Multithreading

5 topics
1.

Mutexes and Semaphores

9 questions
2.

Race Conditions

10 questions
3.

Thread Safety

10 questions
4.

Threads and Processes

10 questions
5.

Using pthreads Library

10 questions

Advanced Topics

5 topics

Error Handling

5 topics

Preprocessor Directives

5 topics

File I/O

5 topics

Structures and Unions

5 topics

Arrays and Strings

5 topics

Pointers and Memory Management

5 topics

Basic Syntax and Structure

5 topics