Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

51.

What will the output of the following C code ?#include <stdio.h>int main(){ int i=2, j=2; while (i+1 ? --i : j++) printf("%d",i); return 0;}(A) 1(B) 2(C) 3(D) 4

Answer»
52.

Consider the C code Below.void function(int n){ if (n == 1) return; for (int i = 0; i<n; i++) { for (int j = 1; j< = n; j++) { printf("*"); break; } }}Which of the following is the tightest upper bound on time complexity of above function.(A) O(n2)(B) O(n)(C) O(n log n)(D) O(1)

Answer»
53.

A balanced tree is given below. How many nodes will become unbalanced when a node is inserted as a child of node G?Note: A node in a tree is balanced if absolute difference between its left and right subtrees is less than or equal to 1.(A) 2(B) 3(C) 4(D) 5

Answer»
54.

Let T(n) = 2T(n/4) + 100√nThe value of T(n) can be written as:(A) θ(√ n)(B) θ(√n log n)(C) θ(n)(D) θ(n log n)

Answer»
55.

Consider the following instance of knapsack problem:The maximum weight of 12 is allowed in the knapsack.Find the value of maximum profit with the optimal solution of the fractional knapsack problem.(A) 31(B) 40.2(C) 48.5(D) None of these

Answer»
56.

Find the maximum value of the expression (x+y+k) where (x,y) satisfies the equation (x-2)2 + (y-3)2 = 25(A) (5+k) + 5√2(B) 5+k(C) 5 + √k(D) 2+k

Answer»