Data Structure and Algorithms (DSA) MCQs with answers Page - 31

Here, you will find a collection of MCQ questions on Data Structure and Algorithms (DSA). Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

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

  • (A) garbage collection
  • (B) garbage compaction
  • (C) linked list
  • (D) free storage

A

Admin • 833.24K Points
Coach

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

  • (A) circular
  • (B) grounded
  • (C) header
  • (D) doubly

A

Admin • 833.24K Points
Coach

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

  • (A) array
  • (B) linked list
  • (C) queue
  • (D) stack

A

Admin • 833.24K Points
Coach

Q. What is error in following declaration?
struct outer{ int a;
struct inner{
char c;
};
};

  • (A) nesting of structure is not allowed in c
  • (B) it is necessary to initialize the member variable
  • (C) inner structure must have name
  • (D) outer structure must have name

A

Admin • 833.24K Points
Coach

Q. 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;
}

  • (A) -60
  • (B) -30
  • (C) 60
  • (D) garbage value

A

Admin • 833.24K Points
Coach

Q. 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;
}

  • (A) equal
  • (B) less than
  • (C) greater than
  • (D) compiler error

A

Admin • 833.24K Points
Coach

Q. 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;
}

  • (A) 5
  • (B) 6
  • (C) 7
  • (D) 0

A

Admin • 833.24K Points
Coach

Q. 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; }

  • (A) 12
  • (B) 8
  • (C) 4
  • (D) 1

A

Admin • 833.24K Points
Coach

Q. C language was invented by

  • (A) abacus
  • (B) charles babage
  • (C) thomson
  • (D) dennis ritchie

A

Admin • 833.24K Points
Coach

Q. The data type created by the data abstraction process is called

  • (A) class
  • (B) structure
  • (C) abstract data type
  • (D) user defined data type

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ