MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following is/are non-primitive data structures?
A
Arrays, Linklist
B
Stack, Queue
C
Trees, Graphs
D
All the above
Explanation: 

Detailed explanation-1: -Examples of non-primitive types are Strings, Arrays, Classes, Interface, etc.

Detailed explanation-2: -Non-primitive data types or reference data types refer to instances or objects. They cannot store the value of a variable directly in memory. They store a memory address of the variable. Unlike primitive data types, which are defined by Java, non-primitive data types are user-defined.

Detailed explanation-3: -Answer to Question #146460 in Programming & Computer Science for Joshua. Which of the following is not a primitive data type in Java? char. Therefore, string is the only one non-primitive data type in this list.

Detailed explanation-4: -Non-primitive data structures are the data structures that are created using the primitive data structures. It is little bit complicated as it is derived from primitive data structures. Some of Non-primitive data structures are linked lists, stacks, trees, and graphs.

Detailed explanation-5: -There are five types of non-primitive data types in Java. They are as follows: Class. Object.

There is 1 question to complete.