Programming in C Lab quiz II

Programming in C Lab quiz II

12th Grade

20 Qs

quiz-placeholder

Similar activities

Pointer Arithmetic in C Programming

Pointer Arithmetic in C Programming

9th - 12th Grade

15 Qs

File Handling In Python

File Handling In Python

12th Grade

20 Qs

Computer Software

Computer Software

KG - Professional Development

15 Qs

INFORMATIKA

INFORMATIKA

10th - 12th Grade

20 Qs

Robotics II_NXT

Robotics II_NXT

8th - 12th Grade

15 Qs

Quick Revision H466 #1

Quick Revision H466 #1

12th Grade - University

15 Qs

Operating Systems

Operating Systems

9th - 12th Grade

25 Qs

JAVASCRIPT

JAVASCRIPT

12th Grade

25 Qs

Programming in C Lab quiz II

Programming in C Lab quiz II

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Balamurugan Munisamy

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a pointer in C?

A pointer in C is a variable that stores the memory address of another variable.

A pointer in C is a data type that stores multiple values

A pointer in C is a function that returns a memory address

A pointer in C is a keyword used to declare constants

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you handle files in C?

Delete files directly without closing them

Use Python instead of C

Print files to the console instead of reading/writing

Include , open file with fopen(), read/write with functions like fscanf(), fprintf(), fread(), fwrite(), and close file with fclose().

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explain the concept of functions in C.

Functions in C do not have a return type.

Functions in C are blocks of code that perform a specific task. They are reusable and modular, allowing for better organization and easier debugging. Functions in C have a return type, a name, parameters, and a body where the actual code is written.

Functions in C cannot have parameters.

Functions in C are used for decorative purposes only.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are arrays in C?

Arrays in C can only store primitive data types and not complex objects.

Arrays in C are limited to a fixed number of elements and cannot be resized.

Arrays in C are a collection of elements of the same data type stored in contiguous memory locations.

Arrays in C are a collection of elements of different data types stored in non-contiguous memory locations.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you perform dynamic memory allocation in C?

Dynamic memory allocation is not possible in C

Declare a static array with a large size to allocate memory

Use functions like malloc, calloc, or realloc to allocate memory during runtime and free the memory using the free function.

Use functions like free, allocate, or reserve to allocate memory

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the significance of command line arguments in C?

They provide a way to customize program behavior without modifying the source code.

They allow the program to run faster

They are used for debugging purposes only

They are only used in object-oriented programming languages

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for declaring a pointer in C?

int ptr*;

int *ptr;

int* ptr;

int ptr;

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?