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.

1.

A bipartite graph may contain nodes with self loops.(A) True(B) False

Answer»
2.

A student started studying Competitive programming from his senior and will study for 7 days. What is the minimum number of cuts he can have on gold bar so that his senior gets 1 unit of gold at the end of everyday as return.(A) 7(B) 2(C) 3(D) Not Possible

Answer»
3.

Time Complexity to find smallest element in Binary Max Heap?(A) O(logN)(B) O(N)(C) O(N * logN)(D) O(1)

Answer»
4.

Given above is the directed graph representing nodes and edges. Chose the correct option for nodes after topological sorting?(A) 5 4 2 3 1 0(B) 0 1 3 2 4 5(C) 5 0 1 2 3 4(D) 5 0 4 1 2 3

Answer»
5.

What is the output of following code :#include <iostream>using namespace std;int main(){try {throw 10;}catch (char *excp) {cout << "Caught " << excp;}catch (...) {cout << "Default Exception\n";}return 0;}(A) Compiler Error(B) Caught Default Exception(C) Caught Integer Exception(D) Default Exception

Answer»
6.

What is the output of following code?#include <stdio.h>int main(){const int x;x = 10;printf("%d", x);return 0;}(A) Compiler Error(B) 10(C) 0(D) Runtime Error

Answer»
7.

Given following three values, What is the total number of maximum chocolates you can eat ?Total Money you have to buy chocolates = 50Price of single chocolate = 3Number of wrappers to be returned for getting one extra chocolate = 4(A) 20(B) 19(C) 22(D) 21

Answer»
8.

Consider the procedure below for the Producer-Consumer problem which uses Semaphores and choose the correct statement:semaphore n = 0;semaphore s = 1;// Producer Functionvoid producer(){while(true){produce();semWait(s);addToBuffer();semSignal(s);semSignal(n);}}// Consumer functionvoid consumer(){while(true){semWait(s);semWait(n);removeFromBuffer();semSignal(s);consume();}}(A) The producer will be able to add an item to the buffer, but the consumer can never consume it.(B) The consumer will remove no more than one item from the buffer.(C) Deadlock occurs if the consumer succeeds in acquiring semaphore s when the buffer is empty.(D) The starting value for the semaphore n must be 1 and not 0 for deadlock-free operation.

Answer»
9.

Which of the following protocol uses 3-way handshake technique?(A) TCP(B) IGMP(C) SMTP(D) UDP

Answer»
10.

In software engineering, which testing technique is in general performed to determine how a system performs in terms of responsiveness and stability under a particular workload ?(A) Smoke Testing(B) Load Testing(C) Performance Testing(D) Black Box Testing

Answer»