• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Top MCQs on Data Structures | DSA Quiz for Beginners

Question 1

Which of the following syntax correctly declares an Array?

  • int geeks;

  • array geeks[20];

  • geeks{20};

  • int geeks[20];

Question 2

The size of the array should always be _____

  • Positive

  • Negative

  • whole Number

  • Real Number

Question 3

What is the correct way to initialize values in an array?

  • my_array [5] = (5,3,4,2,7);

  • my_array [5] = {5;3;4;2;7};

  • my_array [5] = {5,3,4,2,7,5,6,7,8};

  • my_array [5] = {1,2,3,4,5};

Question 4

In an array int arr[3]={1,2,3}, what will happen if we try to access arr[4] in C/C++?

  • Run TIme error

  • 3

  • 0

  • Garbage value

Question 5

Which of these operators can be used to concatenate two or more String objects?

  • "+"

  • "+="

  • "&"

  • None of these

Question 6

Which of these methods of class String is used to obtain the length of the String object?

  • get()

  • Sizeof()

  • lengthof()

  • length()

Question 7

In a circular linked list, the last node points to the____.

  • this pointer

  • tail pointer

  • first node

  • middle node

Question 8

What advantage does a linked list have over an array?

  • A linked list is not of a fixed size

  • It's better

  • It is easier to use

  • A linked list can give you the data faster

Question 9

Nodes in a linked list contain two things: 

  • A pointer and a node

  • A Pointer and a reference

  • Direction and a pointer

  • Data and a pointer

Question 10

The last node of the singly-linked list contains ___

  • NULL

  • Next pointer

  • Data

  • None of the above

There are 30 questions to complete.

Last Updated :
Take a part in the ongoing discussion