Skip to content

Tag Archives: Misc

Consider the following C function. float f(float x, int y)  {    float p, s; int i;    for (s=1, p=1, i=1; i < y; i ++) … Read More
An element in an array X is called a leader if it is greater than all elements to the right of it in X. The… Read More
The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is (A)… Read More
A set X can be represented by an array x[n] as follows: Consider the following algorithm in which x,y and z are Boolean arrays of… Read More
Which of the following is not an in-place algorithm? (A) Insertion sort (B) Selection sort (C) Merge sort (D) Heap sort Answer: (C) Explanation: An… 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
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
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
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
In a complete k-ary tree, every internal node has exactly k children. The number of leaves in such a tree with n internal nodes is:… Read More
The number of tokens in the following C statement is (GATE 2000) printf("i = %d, &i = %x", i, &i); (A) 3 (B) 26 (C)… Read More
The C language is. (GATE CS 2002) (A) A context free language (B) A context sensitive language (C) A regular language (D) Parsable fully only… Read More
In the C language (GATE CS 2002) (A) At most one activation record exists between the current activation record and the activation record for the… Read More

Start Your Coding Journey Now!