Data structure MCQ Quiz Hub

Data Structure and Algorithms (DSA) set 4

Choose a topic to test your knowledge and improve your Data structure skills

Which of the following statement is true about char ****a ?





✅ Correct Answer: 2

Are *ptr++ and ++*ptr are same?





✅ Correct Answer: 3

What will be the output of the following code? Void main(){int a=10;int *b=&a;int **c=&b;printf("%d %d %d",a,*b,**c);}





✅ Correct Answer: 3

Which of the following is a collection of different data type elements?





✅ Correct Answer: 2

What is the similarity between structure,union and enum?





✅ Correct Answer: 4

The members of the union are accessed by____





✅ Correct Answer: 4

How many bits are absolutely necessary to store an ASCII character ?





✅ Correct Answer: 1

The result of 0001 1010 & 0000 1000 is ___





✅ Correct Answer: 3

The result of 0001 1010^0001 0000 is____





✅ Correct Answer: 3

The result of 0001 1010 << 2 is____





✅ Correct Answer: 2

The most significant bit is lost in following operation





✅ Correct Answer: 1

What will be output if you will compile and execute the following c code? #include<stdio.h> int main(){ char c=125; c=c+10; printf("%d",c); return 0; }





✅ Correct Answer: 3

What will be output if you will compile and execute the following c code? #include<stdio.h> int main(){ int i=4,x; x=++i + ++i + ++i; printf("%d",x); return 0; }





✅ Correct Answer: 1

What will be output if you will compile and execute the following c code? #include<stdio.h> int main(){ int a=2; if(a==2){ a=~a+2<<1; printf("%d",a); } else{ break; } return 0; }





✅ Correct Answer: 4

. #include <stdio.h> #include <string.h> int main(){ int i=0; for(;i<=2;) printf(" %d",++i); return 0; }





✅ Correct Answer: 3

What will be output if you will compile and execute the following c code? #include<stdio.h> int main(){ int array[]={10,20,30,40}; printf("%d",-2[array]); return 0; }





✅ Correct Answer: 4

What will be output if you will compile and execute the following c code? #include<stdio.h> int main(){ int i=10; static int x=i; if(x==i) printf("Equal"); else if(x>i) printf("Greater than"); else printf("Less than"); return 0; }





✅ Correct Answer: 4

What will be output if you will compile and execute the following c code? #include<stdio.h> #define max 5; int main(){ int i=0; i=max++; printf("%d",i++); return 0; }





✅ Correct Answer: 4

What will be output if you will compile and execute the following c code? #include<stdio.h> int main(){ double far* p,q; printf("%d",sizeof(p)+sizeof q); return 0; }





✅ Correct Answer: 1

C language was invented by





✅ Correct Answer: 4

The data type created by the data abstraction process is called





✅ Correct Answer: 3

A variable which is visible only in the function in which it is defined, is called





✅ Correct Answer: 4

Which of the following data structure is linear type ?





✅ Correct Answer: 4

Unsigned integers occupies





✅ Correct Answer: 3

Unsigned integers occupies





✅ Correct Answer: 1

In C, if you pass an array as an argument to a function, what actually gets passed?





✅ Correct Answer: 3

Which data structure allows deleting data elements from front and inserting at rear?





✅ Correct Answer: 2

Queue is a -------------- List .





✅ Correct Answer: 1

A node in a linked list must contain at least





✅ Correct Answer: 2

Consider that n elements are to be sorted. What is the worst case time complexity of Bubble sort?





✅ Correct Answer: 4

The complexity of linear search algorithm is





✅ Correct Answer: 2

Which of the following data structure is linear data structure?





✅ Correct Answer: 3

What is the maximun number of dimensions an array in C may have?





✅ Correct Answer: 4

An external variable





✅ Correct Answer: 4

The declaration "unsigned u" indicates u is a/an





✅ Correct Answer: 2

A declaration "short int" is used for variables





✅ Correct Answer: 3

Which of the following 'C' type is not a primitive data structure?





✅ Correct Answer: 4

The program fragment int i = 263 ; putchar (i) ; prints





✅ Correct Answer: 3

The variables which can be accessed by all modules in a program, are called





✅ Correct Answer: 4

The main measures of efficiency of an algorithm are





✅ Correct Answer: 3

The worst case occures in linear search algorithms when





✅ Correct Answer: 4

the terms push and pop are related to





✅ Correct Answer: 1

What will be the output of the program? #include<stdio.h> int main() { int X=40; { int X=20; printf("%d ", X); } printf("%d ", X); return 0; }





✅ Correct Answer: 4

What additional requirement is placed on an array, so that binary search may be used to locate an entry?





✅ Correct Answer: 3

One difference between a queue and a stack is:





✅ Correct Answer: 3

If the characters 'D', 'C', 'B', 'A' are placed in a queue (in that order), and then removed one at a time, in what order will they be removed?





✅ Correct Answer: 4

Which of the following formulas in big-O notation best represent the expression n²+35n+6?





✅ Correct Answer: 2

What term is used to describe an O(n) algorithm





✅ Correct Answer: 2

The keyword used to transfer control from a function back to the calling function is





✅ Correct Answer: 4

How many times the program will print "Amrutvahini" ? #include<stdio.h> int main() { printf("Amrutvahini"); main(); return 0; }





✅ Correct Answer: 4

What will be the output of the program? #include<stdio.h> int i; int fun(); int main() { while(i) { fun(); main(); } printf("Hello "); return 0; } int fun() { printf("Hi"); }





✅ Correct Answer: 1

In a linked list, the pointer of the last node contains a special value, called the ______ pointer.





✅ Correct Answer: 1

In a ________ linked list, the last node's link field points to the first node of the list.





✅ Correct Answer: 1

The second part of the node, is called _______ field, and contains the address of the next node in the list.





✅ Correct Answer: 4

The link list also contains a list pointer variable called start or ________.





✅ Correct Answer: 1

A ________ linked list is a linked list structure in which each node has a pointer to both its successor and predecessor.





✅ Correct Answer: 2

_____ list is a special list that is maintained, which consists of unused memory cells.





✅ Correct Answer: 4

______ is a technique using which a computer periodically collects all the deleted space onto the free storage list.





✅ Correct Answer: 1

___ attacks the problem of fragmentation by moving all the allocated blocks to one end of memory, thus combining all the holes.





✅ Correct Answer: 2

A ________ linked list is a linked list which always contains a special node, called the header node.





✅ Correct Answer: 3

A polynomial can be represented in a _______ by just storing the coefficient and exponent of each term.





✅ Correct Answer: 2

______ refers to situation where one wants to delete data form a data structure that is empty





✅ Correct Answer: 2

________ is an organization that provides faster request and return time response.





✅ Correct Answer: 3

_____ attacks the problem of fragmentation by moving all the allocated blocks to one end of memory, thus combining all the holes.





✅ Correct Answer: 2

A _______ list structure can be traversed in two directions-- in the forward direction from beginning of the list to end, or in the backward direction, from the end of the list to the beginning.





✅ Correct Answer: 3

____ header list combines the advantages of a two-way list and a circular header list.





✅ Correct Answer: 2

In linked list,a node contain





✅ Correct Answer: 3

In linked list,the logical order of elements





✅ Correct Answer: 2

Null pointer is used to tell





✅ Correct Answer: 4

List pointer variable in linked list contains address of the





✅ Correct Answer: 3

Because of linear structure of linked list having linear ordering,there is similarity between linked list and array in





✅ Correct Answer: 3

Searching of linked list requires linked list to be created





✅ Correct Answer: 2

A circular list can be used to represent





✅ Correct Answer: 4

To insert a node in a circular list at rear end it should be inserted at …...of the queue





✅ Correct Answer: 3

In a circularly linked list organisation ,insertion of a record involves the modifications of





✅ Correct Answer: 2

What is true about linked kist?





✅ Correct Answer: 1

A node of linked list contains_______





✅ Correct Answer: 3

Which nodes contains a null pointer in a linked list?





✅ Correct Answer: 3

Deletion of a node from an empty linked list will cause________





✅ Correct Answer: 1

Insertion in a linked list requires modification of____pointers





✅ Correct Answer: 2