• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Sudo Placement [1.6]

Question 1

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 ?
  • Smoke Testing
  • Load Testing
  • Performance Testing
  • Black Box Testing

Question 2

Which of the following protocol uses 3-way handshake technique?
  • TCP
  • IGMP
  • SMTP
  • UDP

Question 3

What is the output of following code : [sourcecode] #include using namespace std; int main() { try { throw 10; } catch (char *excp) { cout << "Caught " << excp; } catch (...) { cout << "Default Exception\\n"; } return 0; } [/sourcecode]
  • Compiler Error
  • Caught Default Exception
  • Caught Integer Exception
  • Default Exception

Question 4

Given above is the directed graph representing nodes and edges. Chose the correct option for nodes after topological sorting?
  • 5 4 2 3 1 0
  • 0 1 3 2 4 5
  • 5 0 1 2 3 4
  • 5 0 4 1 2 3

Question 5

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.
  • 7
  • 2
  • 3
  • Not Possible

Question 6

A bipartite graph may contain nodes with self loops.
  • True
  • False

Question 7

Time Complexity to find smallest element in Binary Max Heap?
  • O(logN)
  • O(N)
  • O(N * logN)
  • O(1)

Question 8

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

Question 9

Consider the procedure below for the Producer-Consumer problem which uses Semaphores and choose the correct statement: C
semaphore n = 0;
semaphore s = 1;

// Producer Function
void producer(){
    while(true){
        produce();
        semWait(s);
        addToBuffer();
        semSignal(s);
        semSignal(n);
    }
}
C
// Consumer function
void consumer(){
    while(true){
        semWait(s);
        semWait(n);
        removeFromBuffer();
        semSignal(s);
        consume();
    }
}
  • The producer will be able to add an item to the buffer, but the consumer can never consume it.
  • The consumer will remove no more than one item from the buffer.
  • Deadlock occurs if the consumer succeeds in acquiring semaphore s when the buffer is empty.
  • The starting value for the semaphore n must be 1 and not 0 for deadlock-free operation.

Question 10

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

There are 15 questions to complete.

Last Updated :
Take a part in the ongoing discussion