last

last

Professional Development

10 Qs

quiz-placeholder

Similar activities

Day 6 C Programming Quiz

Day 6 C Programming Quiz

Professional Development

10 Qs

Tree datastructure

Tree datastructure

University - Professional Development

13 Qs

Journey to White Castle

Journey to White Castle

Professional Development

10 Qs

TREE QUIZ

TREE QUIZ

Professional Development

6 Qs

11/10/2021 - Binary search algorithm

11/10/2021 - Binary search algorithm

Professional Development

5 Qs

DSA + System design - 14

DSA + System design - 14

Professional Development

14 Qs

30/09/2022- Binary trees

30/09/2022- Binary trees

Professional Development

8 Qs

SQL Server Indexes

SQL Server Indexes

Professional Development

10 Qs

last

last

Assessment

Quiz

Computers

Professional Development

Medium

Created by

HASAN YIGIT

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will happen if you try to add an arriving plane to a full queue?

The program crashes due to a segmentation fault.

The program adds the plane to the queue anyway, overwriting existing planes.

A warning message "Queue is full!" is displayed, and the plane is not added.

he oldest plane in the queue is removed to make space for the new one.

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Which of the following conditions is used to decide the position of a plane in the priority queue?

Only the fuel level.

Priority level and fuel level.

Both priority and flight number.

Only the priority level.

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the purpose of the strcmp function in the code?

To compare plane priorities.

To verify if a flight number is valid.

To check if the queue is full.

To check if the returned plane structure is empty.

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

How does the program ensure that arrivingPlanes are sorted correctly?

It sorts the queue after each insertion.

It does not ensure sorting; the planes are appended to the end.

It uses a heap-based priority queue.

It shifts elements one position ahead in the array while inserting a plane based on its priority and fuel level.

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Why are front and rear used in the Stack structure for departing planes?

Front is used to track the next departing plane, and rear is used to manage the last added plane.

Front is used for storing all planes, and rear is for tracking the first departing plane.
Front is used to manage the last added plane, and rear is used to track the next departing plane.
Front and rear are used interchangeably for any departing plane.

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the correct way to create a new node in a binary tree in C?

Allocate memory for the node, assign the value, and leave left and right uninitialized.

Use malloc, assign the value, and do not set left and right explicitly.

Allocate memory for the node, assign the value, and set left and right to NULL.

Use calloc to allocate memory and initialize all fields to 0.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you perform an in-order traversal of a binary tree using recursion?

In-order traversal visits nodes in the order: left subtree, current node, right subtree.
In-order traversal visits nodes in the order: left subtree, right subtree, current node.
In-order traversal visits nodes in the order: right subtree, current node, left subtree.
In-order traversal visits nodes in the order: current node, left subtree, right subtree.

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?