Binary MCQ Quiz in தமிழ் - Objective Question with Answer for Binary - இலவச PDF ஐப் பதிவிறக்கவும்

Last updated on Mar 15, 2025

பெறு Binary பதில்கள் மற்றும் விரிவான தீர்வுகளுடன் கூடிய பல தேர்வு கேள்விகள் (MCQ வினாடிவினா). இவற்றை இலவசமாகப் பதிவிறக்கவும் Binary MCQ வினாடி வினா Pdf மற்றும் வங்கி, SSC, ரயில்வே, UPSC, மாநில PSC போன்ற உங்களின் வரவிருக்கும் தேர்வுகளுக்குத் தயாராகுங்கள்.

Latest Binary MCQ Objective Questions

Top Binary MCQ Objective Questions

Binary Question 1:

For which of the following tasks, stack is not suitable data structure?

(a) Binary search in an array

(b) Breadth first search

(c) Implementing function calls

(d) Process scheduling

  1. (b) and (d)
  2. (b) and (c)
  3. (a) and (c)
  4. More than one of the above
  5. None of the above

Answer (Detailed Solution Below)

Option 1 : (b) and (d)

Binary Question 1 Detailed Solution

Concept :

Stack is a data structure in which elements can be inserted and deleted only from one end i.e. top of the stack. It follows the LIFO property i.e. last in first out.

Explanation:

(a) Binary search in an array

Binary search in an array can be performed with the help of stack.  Binary search works on the divide and conquer approach and finds the middle element and then perform the search in the left side if element is smaller than the middle element otherwise search proceed in the right of middle element.

(b) Breadth first search

Breadth first search is graph traversal algorithm. It uses queue data structure to traverse the graph or the tree. It is also used to find the connected components in a graph.

(c) Implementing function calls

Function calls are implemented using the stack data structure. As, when a function call arrives then the state or the data currently operated on is stored on the stack where it is resumed after the execution of function call.

(d) Process scheduling

Process scheduling is implemented using the queue data structure . Ready queue is maintained for the processes which are ready for the execution.

Binary Question 2:

The recurrence relation for binary search algorithm is : 

  1. T(n) = 2T(n/2) O (1) 
  2. T(n) = 2T(n/2) O (n)
  3. T(n) = T(n/2) O (1) 
  4. T(n) = T(n/2) O (n)

Answer (Detailed Solution Below)

Option 3 : T(n) = T(n/2) O (1) 

Binary Question 2 Detailed Solution

The correct answer is T(n) = T(n/2) O (1).

key-point-image Key Points

  • The binary search algorithm is a search algorithm that finds the position of a target value within a sorted array.
  • Binary search works by repeatedly dividing the search interval in half.
  • If the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half.
  • Otherwise, narrow it to the upper half. Repeat until the value is found or the interval is empty.

additional-information-image Additional Information

  • The recurrence relation for the binary search algorithm is T(n) = T(n/2) + O(1).
  • This is because at each step, the algorithm divides the problem size by 2 (hence T(n/2)) and performs a constant amount of work (O(1)).
  • The time complexity of binary search is O(log n) in the worst case.
  • Binary search is more efficient than linear search, especially for large datasets.

Binary Question 3:

Let A be an array of 31 numbers consisting of a sequence of 0’s followed by a sequence of 1’s. The problem is to find the smallest index i such that A[i] is 1 by probing the minimum number of locations in A. The worst-case number of probes performed by an optimal algorithm is 

  1. 8
  2. 4
  3. 5
  4. 10

Answer (Detailed Solution Below)

Option 3 : 5

Binary Question 3 Detailed Solution

The correct answer is 5

Explanation:

Worst case of the given problem is when a single 0 is followed by all 1’s i.e.

0111111111111……

Also, worst case can also be considered as when all 0’s are followed by single 1.

000000000………………1

Since in both the cases there is a sorted sequence of 0 and 1 and for sorted sequence binary search is preferred.

At each stage, the element index is compared and if it is 1, search towards left and if it is 0 search towards the right.

Total worst-case number of probes performed by an optimal algorithm is = ⌈log2  31⌉ = 5 = 5

Example:

Optimal Algorithm: Binary search

Consider element containing 7 elements

Index

0

1

2

3

4

5

6

Element

0

0

0

0

0

0

1

1st probe

 

 

 

 

 

 

 

Index

0

1

2

3

4

5

6

Element

0

0

0

0

0

0

1

2nd probe

 

 

 

 

 

 

 

Index

0

1

2

3

4

5

6

Element

0

0

0

0

0

0

1

3rd probe

 

 

 

 

 

 

 

Maximum probes = ⌈ log27 ⌉ = 3

For 31 elements

Maximum probes = ⌈ log2  31⌉ = 5

Binary Question 4:

The order of the binary search algorithm is _______. 

  1. N
  2. N log n
  3. N2
  4. More than one of the above
  5. None of the above

Answer (Detailed Solution Below)

Option 5 : None of the above

Binary Question 4 Detailed Solution

Binary Search Algorithm Explanation - guacandrollcantina.com

The order of the binary search algorithm is O(log n).

Key Points

  • The binary search algorithm is an efficient algorithm for finding an item from a sorted list of items.
    • It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one.
    • In each step, the algorithm compares the target value to the middle element of the list.
    • If the target value is less than the middle element, the search continues in the lower half of the list; otherwise, it continues in the upper half.
    • This process is repeated until the target value is found or the remaining list is empty.
    • Because the list is divided in half each time, the time complexity of binary search is O(log n).

Additional Information

  • Binary search can only be applied to a list that is sorted. If the list is unsorted, it must be sorted first, which can take O(n log n) time.
  • In contrast, linear search runs in O(n) time and does not require the list to be sorted.
  • The binary search algorithm is commonly used in computer science, including in applications such as database indexing and algorithmic trading.
  • In practical applications, binary search can significantly reduce the time required to search large datasets, making it a valuable tool for optimizing performance.

Binary Question 5:

What is the best-case running time of binary search?

  1. θ(n)
  2. θ(1)
  3. θ(log n)
  4. More than one of the above
  5. None of the above

Answer (Detailed Solution Below)

Option 2 : θ(1)

Binary Question 5 Detailed Solution

Binary search algorithm:

Binary search algorithm is used to find an element in an already sorted array.

STEPS 1:

It finds the middle element of the array and compare the element with the element to be searched, if

it matches then return true.

STEPS 2:

If not, then divide the array into two halves in which if element to be search is less than middle

element then search takes place in left part otherwise search in right half.

STEP 3:

Repeat this process, until you get the element.

Explanation:

Best case of Binary search occurs when element to be searched is the middle element of the array.

Then in that case, it just simply compares the element with the middle element, if matches then return

true.  Comparing with the one element will take only O(1) time complexity.

Best Case: Search 35 in below give array

11

12

15

24

35

50

51

63

17

 

T(n) = O(1)

Binary Question 6:

Choose true statement :

I - Binary search is faster than linear search.

II - Binary search may not be applied on all the input lists on which linear search can be applied.

  1. Only I
  2. Only II
  3. Both I and II
  4. Neither I nor II
  5. None of the above/More than one of the above

Answer (Detailed Solution Below)

Option 3 : Both I and II

Binary Question 6 Detailed Solution

The correct answer is option 3.

Concept:

Statement 1: Binary search is faster than linear search.

True, Unless the array size is tiny, binary search is faster than linear search. However, sorting the array is required before doing a binary search. In contrast to binary search, there exist specialized data structures created for quick searching, such as hash tables.

Statement 2:Binary search may not be applied on all the input lists on which linear search can be applied.

True, Binary search is applied only on the sorted list it can not apply to an unsorted list. Whereas linear search is applicable for all types of lists. It means the sorted or unsorted type of lists.

Hence the correct answer is Both I and II.

Binary Question 7:

In binary search, the key to be searched is compared with the element in the __________ of a sorted list.

  1. End
  2. Front
  3. Middle
  4. None of these

Answer (Detailed Solution Below)

Option 3 : Middle

Binary Question 7 Detailed Solution

The correct option is (3)

Concept:-

The binary search algorithm is used to find a specific element in a sorted array. The target value is compared to the array's middle element in a binary search.

Key Points

  • Sequential search is substantially less efficient than binary search. The elements must, however, be presorted before using the binary search method.
  • It works by dividing the area of the list that could contain the item in half until the number of possible sites is reduced to just one.
  • Binary search is an efficient algorithm and is better than linear search in terms of time complexity.
  • Because it splits the array into two half as part of the process, it's called binary. A binary search will initially compare the item in the middle of the array to the search terms.

F2 Madhuri Engineering 22.06.2022 D5

Binary Question 8:

The minimum number of comparisons for a particular record among 32 sorted records through binary search method will be: 

  1. 16
  2. 5
  3. 8
  4. 2
  5. 4

Answer (Detailed Solution Below)

Option 2 : 5

Binary Question 8 Detailed Solution

Concept:

Binary search: Binary search follows the divide and conquer approach. To search for an element, first find the middle element, if a match found, then return the location. Otherwise, if the element is less than the middle element search will proceed in the left half, else the search will proceed into the right half.

Explanation:

Recurrence relation for binary search :

T(n) = T(n/2) + 1

Time Complexity of this algorithm: O(log2n)

Here, we have to apply the binary search on 32 elements. So, it will take log232 = 5 comparisons to search for the element.

Binary Question 9:

The question is based on the following program fragment.

f (int Y[10], int x) {

Int u, j, k;

i = 0; j = 9;

do {

            k = (i+j) /2;

            if (Y[k] <=x) i = k; else j = k;

} while ( (Y[k] != x) && (i

if (Y[k] == x) printf (“x is in the array.”);

else printf (“x is not in the array.”);

}

On which of the following contents of ‘Y’ and ‘x’ does the program fail?

  1. Y is [1 2 3 4 5 6 7 8 9 10] and x < 10
  2. Y is [1 3 5 7 9 11 13 15 17 19] and x < 1
  3. Y is [2 2 2 2 2 2 2 2 2 2] and x > 2
  4. Y is [2 4 6 8 10 12 14 16 18 20] and 2 < x < 20 and ‘x’ is even

Answer (Detailed Solution Below)

Option 3 : Y is [2 2 2 2 2 2 2 2 2 2] and x > 2

Binary Question 9 Detailed Solution

You can easily understand this program is nothing but binary search

But this is not applicable for all the cases.

Let's check option 3:

Taking , x = 3

For loop 1st time

i = 0 ,  j = 9 and k = 4 After if condition , i = 4 and while condtion is true.

For loop 2nd time

i = 4 , j= 9 and k = 6 ,After if condtion i = 6 and while condtion is true.

For loop 3rd time

i = 6 , j = 9 and k = 7 After if condition, i = 7 and while condtion is true.

For loop 4th time

i = 7 , j= 9 and k = 8 After if condtion, i = 8 and while condition is true.

For loop 5th time

i = 8 , j =9 and k = 8 After if condition , i = 8 and while condition is true.

 

Conclusion:

After 5th for loop i will again become 8 because of the k = 8 so this case is now in infinite loop state so option 3 is failed.

Final  conclusion:

If the element we want to search is more than or equal to last element of array then in that case all the test cases will be failed.

Binary Question 10:

Let A be an array of 31 numbers consisting of a sequence of 0’s followed by a sequence of 1’s. The problem is to find the smallest index i such that A[i] is 1 by probing the minimum number of locations in A. The worst-case number of probes performed by an optimal algorithm is _____.

  1. 2
  2. 3
  3. 4
  4. 5

Answer (Detailed Solution Below)

Option 4 : 5

Binary Question 10 Detailed Solution

Worst case of the given problem is when a single 0 is followed by all 1’s i.e.

0111111111111……

Also, worst case can also be considered as when all 0’s are followed by single 1.

000000000………………1

Since in both the cases there is a sorted sequence of 0 and 1 and for sorted sequence binary search is preferred.

At each stage, the element index is compared and if it is 1, search towards left and if it is 0 search towards the right.

Total worst-case number of probes performed by an optimal algorithm is = ⌈log2  31⌉ = 5 = 5

Example:

Optimal Algorithm: Binary search

Consider element containing 7 elements

Index

0

1

2

3

4

5

6

Element

0

0

0

0

0

0

1

1st probe

 

 

 

 

 

 

 

Index

0

1

2

3

4

5

6

Element

0

0

0

0

0

0

1

2nd probe

 

 

 

 

 

 

 

Index

0

1

2

3

4

5

6

Element

0

0

0

0

0

0

1

3rd probe

 

 

 

 

 

 

 

Maximum probes = ⌈ log27 ⌉ = 3

For 31 elements

Maximum probes = ⌈ log31⌉ = 5

Get Free Access Now
Hot Links: teen patti vip teen patti refer earn teen patti casino apk teen patti 3a