Search Header Logo

C Programming Fundamentals

Authored by Chandula Rajapaksa

Information Technology (IT)

University

Used 2+ times

C Programming Fundamentals
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the basic data types in C?

int8, int16, int32, int64, char8

int, float, double, char, void

byte, short, long, float, decimal

string, boolean, list, map, set

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the purpose of control structures in C.

The purpose of control structures in C is to manage the flow of execution in a program, enabling decision-making and repetition.

The purpose of control structures in C is to define data types and structures.

Control structures in C are used for memory management and optimization.

Control structures in C help in organizing code into separate files and modules.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the scope of a variable in a function?

The scope of a variable in a function is limited to the entire module.

The scope of a variable in a function is shared across all functions.

The scope of a variable in a function is global to the entire program.

The scope of a variable in a function is local to that function.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare an array in C?

char arr[10];

int arr[10];

double arr[10];

float arr[10];

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a pointer and how is it used in C?

A pointer is a variable that holds the memory address of another variable, used for direct memory access and manipulation in C.

A pointer is a type of function that executes code in C.

A pointer is a constant value that cannot be changed in C.

A pointer is a data structure that stores multiple variables in C.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Describe the process of file handling in C.

Closing a file before writing to it

Only using file names without paths for access

Reading files without opening them first

The process of file handling in C includes opening a file, performing read/write operations, and closing the file.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you perform basic input/output in C?

Use 'cout' for output and 'cin' for input in C++.

Employ 'write' for output and 'read' for input in C.

Use 'printf' for output and 'scanf' for input in C.

Utilize 'echo' for output and 'input' for input in C.

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?