Skip to content
Gblog Must Do Coding Questions for Product Based Companies
As the placement season is back, Geeksforgeeks is here to help you crack the interview. We have selected some most commonly asked and MUST DO… Read More
February 15, 2021
Put the following disk scheduling policies results in minimum amount of head movement. (A) FCFS (B) Circular SCAN (C) Elevator Answer: (C) Explanation: Circular scanning… Read More
Normally user programs are prevented from handling I/O directly by I/O instructions in them. For CPUs having explicit I/O instructions, such I/O protection is ensured… Read More
Kadane algorithm is used to find: (A) Maximum sum subsequence in an array (B) Maximum sum subarray in an array (C) Maximum product subsequence in… Read More
Which data structure is most efficient to find the top 10 largest items out of 1 million items stored in file? (A) Min heap (B)… Read More
Given a string, count number of words in it. The words are separated by following characters: space (‘ ‘) or new line (‘\n’) or tab… Read More
In a village, people build houses in the same side of the road. A thief plans to loot the village. He wants maximum amount of… Read More
Given 8 identical coins out of which one coin is heavy and a pan balance. How many minimum number of measurements are needed to find… Read More
What is the time complexity of Floyd–Warshall algorithm to calculate all pair shortest path in a graph with n vertices? (A) O(n^2logn) (B) Theta(n^2logn) (C)… Read More
Which data structure is used in redo-undo feature? (A) Stack (B) Queue (C) Tree (D) Graph Answer: (A) Explanation: Stack data structure is most suitable… Read More
What does it mean when we say that an algorithm X is asymptotically more efficient than Y? (A) X will be a better choice for… Read More
The following statement is valid. log(n!) = (n log n). (A) True (B) False Answer: (A) Explanation: Order of growth of and is same for… Read More
Output? #include <stdio.h>    int main() {     int (*ptr)(int ) = fun;     (*ptr)(3);     return 0; }    int fun(int n) {   for(;n > 0; n--)… Read More
In a competition, four different functions are observed. All the functions use a single for loop and within the for loop, same set of statements… Read More
Which file is generated after pre-processing of a C program? (A) .p (B) .i (C) .o (D) .m Answer: (B) Explanation: After the pre-processing of… Read More
Which data structure is used for balancing of symbols? (A) Stack (B) Queue (C) Tree (D) Graph Answer: (A) Explanation: Stack is used for balancing… Read More