Quiz-1

Hello PrepSter,

If you find any errors in the quiz below kindly comment in the comment section and we will make it our priority to fix it.

Also if you have a better of the solution to the questions, please do comment them below and if we find it better than ours, we will post it in our website.

Question 1

Time: 00:00:00
`A linear collection of data elements where the linear node is given by means of pointer is called?`

Node list

Node list

Primitive list

Primitive list

None of the mentioned

None of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 2

Time: 00:00:00
```Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only.
Given the representation, which of the following operation can be implemented in O(1) time?
i) Insertion at the front of the linked list
ii) Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the last node of the linked list```

I and II

I and II

I and III

I and III

I, II and III

I, II and III

I, II and IV

I, II and IV

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 3

Time: 00:00:00
`In linked list each node contain minimum of two fields. One field is data field to store the data second field is?`

Pointer to character

Pointer to character

Pointer to integer

Pointer to integer

Pointer to node

Pointer to node

Pointer to node

Pointer to node

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 4

Time: 00:00:00
` What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list?`

O(1)

O(1)

O(n)

O(n)

θ(n)

θ(n)

θ(1)

θ(1)

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 5

Time: 00:00:00
`The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used?`

Array implementation of list

Array implementation of list

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 6

Time: 00:00:00
```What does the following function check for? (all necessary headers to be included and function is called from main)

#define MAX 10

typedef struct stack
{
int top;
int item[MAX];
}stack;

int function(stack *s)
{
if(s->top == -1)
return 1;
else return 0;
}```

full stack

full stack

invalid index

invalid index

empty stack

empty stack

infinite stack

infinite stack

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 7

Time: 00:00:00
`Which of these best describes an array?`

A data structure that shows a hierarchical behavior

A data structure that shows a hierarchical behavior

Container of objects of similar types

Container of objects of similar types

Container of objects of mixed types

Container of objects of mixed types

All of the mentioned

All of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 8

Time: 00:00:00
`How do you initialize an array in C?`

int arr[3] = (1,2,3);

int arr[3] = (1,2,3);

int arr(3) = {1,2,3};

int arr(3) = {1,2,3};

int arr[3] = {1,2,3};

int arr[3] = {1,2,3};

int arr(3) = (1,2,3);

int arr(3) = (1,2,3);

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 9

Time: 00:00:00
` How do you instantiate an array in Java?`

int arr[] = new int(3);

int arr[] = new int(3);

int arr[];

int arr[];

int arr[] = new int[3];

int arr[] = new int[3];

int arr() = new int(3);

int arr() = new int(3);

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 10

Time: 00:00:00
`Which of the following is a correct way to declare a multidimensional array in Java?`

int[][] arr;

int[][] arr;

int arr[][];

int arr[][];

int []arr[];

int []arr[];

All of the mentioned

All of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.