C Language Fundamentals

C Language Fundamentals

University

10 Qs

quiz-placeholder

Similar activities

Latihan 4 : Cluster dan Error cluster, File Input/Output

Latihan 4 : Cluster dan Error cluster, File Input/Output

University

10 Qs

Alpro 2 Mg 1 - Understanding C++ Basics

Alpro 2 Mg 1 - Understanding C++ Basics

University

10 Qs

Applied Digital Logic Design Assessment II

Applied Digital Logic Design Assessment II

University

8 Qs

TECH WHIZ

TECH WHIZ

University

15 Qs

Exploring the 8086 Microprocessor

Exploring the 8086 Microprocessor

University

10 Qs

Acero

Acero

University

10 Qs

CYBERSYNAPSE

CYBERSYNAPSE

University

15 Qs

C Programming Basics

C Programming Basics

University

10 Qs

C Language Fundamentals

C Language Fundamentals

Assessment

Quiz

Engineering

University

Hard

Created by

Dr. N

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the basic data types available in C?

int, float, double, char, void

string, boolean, list, map

integer, decimal, character, null

list, short, long, float

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the difference between 'if' and 'switch' control structures.

'if' is used for loops, while 'switch' is for single conditions.

'if' is a function, while 'switch' is a variable type.

'if' can only handle two cases, whereas 'switch' can handle more than two.

The 'if' structure is for conditional checks, while 'switch' is for evaluating multiple cases based on a single expression.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a function in C?

To create loops in C

To define variables in C

To manage memory allocation in C

The purpose of a function in C is to encapsulate code for specific tasks, enabling code reuse and organization.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a pointer in C?

int *ptr[];

int ptr;

pointer int ptr;

int *ptr;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the relationship between arrays and pointers in C?

Arrays can only store integers in C.

Arrays and pointers are closely related; the name of an array acts as a pointer to its first element.

Pointers cannot be used to access array elements.

The size of an array is always fixed and cannot be changed.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you open a file for reading in C?

FILE *file = fopen("filename.txt", "r");

FILE *file = fopen("filename.txt", "a");

FILE *file = fopen("filename.txt", "w");

FILE *file = open("filename.txt");

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the scope of a variable declared inside a function?

Block scope

Static scope

Local scope

Global scope

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?