Data Structures (3330704) MCQs

MCQs of Basic Concepts of Data Structures

Showing 21 to 30 out of 37 Questions
21.

Which of the followng describes an array ?

( નીચેનામાંથી ક્યું Array ને ડીસ્ક્રાઇબ કરે છે?  )

(a)

 A data structure that shows a hierarchical behaviour

( ડેટા સ્ટ્રક્ચર કેજે  હાઈરારચીકલ બિહેવિઅર દર્શાવે છે )

(b)

Contains same type of Object

( સમાન પ્રકાર ના ઓબ્જેક્ટ હોય છે  )

(c)

 Arrays are immutable 

( Array ઇમ્મુટેબલે છે  )

(d)

 Array is not a data structure

( Array ડેટા સ્ટ્રક્ચર નથી  )

Answer:

Option (b)

22.

Which of the following is correct for initialize array ?

( નીચેનામાંથી કયું Array ને ઇનીસીએલાઈઝ કરવા માટે સાચું છે ? )

(a)

int a() = (1,2,3)

(b)

int a[] = (1,2,3)

(c)

int a[] = {1, 2, 3}

(d)

int a[] = [1, 2, 3]

Answer:

Option (c)

23.

The Maximum index of an array is called its _______.

(Array ની મેક્સીમમ ઈન્ડેક્સ ______ કેહવાય છે. )

(a)

Lowerbound

( લોવર બાઉન્ડ   )

(b)

Upperbound

( અપ્પર બાઉન્ડ   )

(c)

Range

( રેન્જ  )

(d)

Extraction

( એક્સટ્રેકશન  )

Answer:

Option (b)

24.

Two dimensional arrays are also called ________.

( બે ડાઈમેંશનલ Array ને _______ કહેવાય છે. )

(a)

Table array

( ટેબલ Array )

(b)

Matrix Arrays

( મેટ્રિક્સ  Array )

(c)

Both Table Array & Matrix array

( ટેબલ Array અને મેટ્રિક્સ  Array બંને )

(d)

Row Array

( રો Array )

Answer:

Option (c)

25.

The memory address of the first element of an array is called _______.

( Array ના ફર્સ્ટ એલિમેન્ટ ના મેમરી  એડ્રેસને _____ કહેવાય છે. )

(a)

First Address

( ફર્સ્ટ એડ્રેસ  )

(b)

Floor Address

( ફ્લોર એડ્રેસ  )

(c)

Starting Address

( સ્ટાર્ટિંગ એડ્રેસ  )

(d)

Base Address

( બેઝ એડ્રેસ  )

Answer:

Option (d)

26.

If row-major order is used, how is the following matrix stored in memory?

a b c

d e f

g h i 

 

રો-મેજર નો ઉપયોગ કરીંને નીચેના મેટ્રિક્સ મેમરી માં કેવી રીતે સ્ટોર થશે?

a b c

d e f

g h i 

 

(a)

abdeghcfi

(b)

abcdefghi

(c)

adgbehcfi

(d)

aeibfcdhg

Answer:

Option (b)

27.

Which of the following equation is correct for row-major-array ?

(નીચે આપેલ વિકલ્પ માં]થી રો-મેજર-એરે ઈક્વેશન માટે ક્યું સાચું છે)

(a)

A[i, j] = Lo + (i - 1) * m + (j - 1)

(b)

A[i, j ] =Lo + (j - 1) * n + (i - 1)

(c)

A[i, j] = Lo + (i - 1) * n + (j - 1)

(d)

A[i, j ] =Lo + (j - 1) * m + (i - 1)

Answer:

Option (a)

28.

What will be the output of following code?

( નીચે આપેલ કોડ નું આઉટપુટ શું આવશે ? )

(a)

3 and 5

(b)

2 and 3

(c)

2 and 4

(d)

4 and 2

Answer:

Option (a)

29.

What will be the output of following code?

(નીચે આપેલ કોડ નું આઉટપુટ શું આવશે ? )

(a)

1

(b)

2

(c)

4

(d)

Compilation Error

Answer:

Option (d)

30.

Which search technique used with sorted elements only ?

(કઈ સર્ચ  ટેક્નિકમાં ફક્ત શોર્ટેડ એલિમેન્ટનો ઉપયોગ થાય છે ? )

(a)

Linear search

( લિનીઅર સર્ચ )

(b)

Binary Search

( બાઈનરી સર્ચ )

(c)

Both Linear Search and Binary Search 

( લિનીઅર સર્ચ અને બાઈનરી સર્ચ બંને )

(d)

Neither Linear Search nor Binary Search 

( લિનીઅર સર્ચ અને બાઈનરી સર્ચ માંથી એક પણ નહિ)

Answer:

Option (b)

Showing 21 to 30 out of 37 Questions