Mastering Programming Concepts

Mastering Programming Concepts

University

27 Qs

quiz-placeholder

Similar activities

UAS DPK

UAS DPK

University

25 Qs

Code Carnival

Code Carnival

University

25 Qs

Programming Skills C/C++

Programming Skills C/C++

University

25 Qs

STUCTURES

STUCTURES

University

25 Qs

c-basics-1

c-basics-1

10th Grade - Professional Development

24 Qs

c programming

c programming

University

30 Qs

OODP FT1 Assessment Questions

OODP FT1 Assessment Questions

University

30 Qs

Data Structures Priliminary

Data Structures Priliminary

University

30 Qs

Mastering Programming Concepts

Mastering Programming Concepts

Assessment

Quiz

Computers

University

Hard

Created by

Mr. Gogoi

FREE Resource

27 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of accessing an element in an array?

O(n^2)

O(log n)

O(1)

O(n)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid declaration of a pointer in C?

int ptr;

float *ptr = NULL;

char ptr;

int *ptr;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: int a = 5; printf('%d', a++);?

5.0

5

4

6

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of a stack data structure?

To store data in a First In, First Out (FIFO) manner.

To maintain a sorted list of elements.

To manage data in a Last In, First Out (LIFO) manner.

To allow random access to elements in any order.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C, how do you declare a function that returns an integer?

void functionName() {}

int functionName() {}

int functionName[] {}

function intName() {}

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code print? int x = 10; printf('%d', ++x);

x

12

10

11

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data structure uses LIFO (Last In, First Out) principle?

Queue

Linked List

Stack

Array

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?