wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Page 1

Total questions: 9

Worksheet time: 17mins

Name
Class
Date
1.

A team must choose a language for developing firmware that balances low-level control with high-level simplicity. Which choice best justifies selecting C for this task?

a)

It is purely high-level, hiding hardware details fully

b)

It is mid-level, combining efficiency with portability

c)

It is scripting-only, optimized for rapid prototyping

d)

It is graphical, offering visual block programming

2.

A legacy project lists B language as its predecessor and Unix origins in the 1970s. Which inference about C’s lineage is most defensible?

a)

C derived from B at Bell Labs

b)

C originated from Ada at CERN

c)

C evolved from Pascal under Microsoft

d)

C was rewritten from COBOL for banking

3.

You plan to migrate a toolchain across diverse platforms with minimal code changes. Which argument for C best addresses portability planning?

a)

C is highly portable across systems

b)

C runs only on Unix variants

c)

C requires proprietary compilers

d)

C depends on embedded interpreters

4.

A developer is considering C for a project that requires efficient memory management. Which feature of C best supports this requirement?

a)

C allows manual memory allocation and deallocation

b)

C automatically manages memory through garbage collection

c)

C restricts access to memory for safety

d)

C uses a virtual machine for memory management

5.

In C, what is the primary purpose of the 'main' function?

a)

To handle exceptions

b)

To serve as the entry point of the program

c)

To declare libraries

d)

To define global variables

6.

What role does the 'void' keyword play in function prototypes in C programming?

a)

It signifies that the function does not return a value

b)

It permits the use of variable-length arguments

c)

It indicates a pointer type

d)

It represents a fixed value

7.

Which data type in C is used to store a single character?

a)

double

b)

float

c)

char

d)

int

8.

What is the size of an 'int' data type in C on a typical 32-bit system?

a)

2 bytes

b)

4 bytes

c)

8 bytes

d)

1 byte

9.

What is the purpose of the 'return' statement in a C function?

a)

To create a loop

b)

To declare a variable

c)

To return a value to the caller

d)

To exit the program immediately