Top 350+ Solved Data Structure and Algorithms (DSA) MCQ Questions Answer

From 61 to 75 of 305

Q. Linked lists are not suitable to for the implementation of?

a. insertion sort

b. radix sort

c. polynomial manipulation

d. binary search

  • d. binary search

Q. consider the function f defined here:struct item{int data;struct item * next;};int f (struct item *p){return((p==NULL) ||((p->next==NULL)||(p->data<=p->next->data) && (p->next)));}For a given linked list p, the function f returns 1 if and only if

a. the list is empty or has exactly one element

b. the element in the list are sorted in non-decreasing order of data value

c. the element in the list are sorted in non-increasing order of data value

d. not all element in the list have the same data value

  • b. the element in the list are sorted in non-decreasing order of data value

Q. Finite sequence S of Zero or more chatacters is called_____

a. array

b. list

c. string

d. block

  • c. string

Q. String with zero characters is called____string

a. null

b. binary

c. totalled

d. list

  • a. null

Q. Groups of consecutive element in a string.Such as words,phrase and sentences are called___

a. main string

b. substring

c. index

d. block

  • b. substring

Q. _____operation of word processing invovles replacing one string in the text by another.

a. insertion

b. deletion is easier

c. searching

d. replacement

  • d. replacement

Q. _____is the problem of deciding whether or not a given string problem p appears in a text T.

a. pattern matching

b. searching

c. sorting

d. deletion

  • a. pattern matching

Q. If string1=john,and string2=Rivers are merged,the process is called

a. insertion

b. deletion

c. concatenation

d. replacement

  • c. concatenation

Q. ____is a variable whose length may vary during the execution of a program.

a. dynamic

b. static

c. semistatistic

d. global

  • a. dynamic

Q. NurseryLand.Nursery.Students = 10;

a. the structure students is nested within the structure nursery

b. the structure nurseryland is nested within the structure nursery.

c. the structure nursery is nested within the structure nurseryland.

d. the structure nursery is nested within the structure students

  • c. the structure nursery is nested within the structure nurseryland.

Q. If a function is declared as void fn(int *p), then which of the following statements is valid to call function fn?

a. fn(x) where x is defined as int x;

b. fn(x) where x is defined as int *x;

c. fn(&x) where x is defined as int *x;

d. fn(*x) where x is defined as int *x;

  • b. fn(x) where x is defined as int *x;

Q. To declare an array S that holds a 5-character string, you would write

a. char s[5]

b. char s[6]

c. string s[5]

d. stringchar s[5]

  • a. char s[5]

Q. The constructed datatype in C is known as

a. string

b. array

c. structure

d. pointer

  • c. structure

Q. A structure definition is called as

a. template

b. member

c. both 1 & 2

d. none of these

  • a. template
Subscribe Now

Get All Updates & News