Skip to content
All Medium Articles
Out of all the 2-digit integers between 1 and 100, a 2-digit number has to be selected at random. What is the probability that the… Read More
A computer uses 46-bit virtual address, 32-bit physical address, and a three-level paged page table organization. The page table base register stores the base address… Read More
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have atmost two source operands… Read More
(A) A (B) B (C) C (D) D Answer: (A) (D) Explanation:   Given statement is : ¬ ∃ x ( ∀y(α) ∧ ∀z(β) )… Read More
Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a global parameter. MultiDequeue(Q){ m = k while (Q is… Read More
Determine the maximum length of the cable (in km) for transmitting data at a rate of 500 Mbps in an Ethernet LAN with frames of… Read More
Consider the following function: int unknown(int n) {     int i, j, k = 0;     for (i  = n/2; i <= n; i++)         for (j =… Read More
Consider the languages L1 = and L2 = {a}. Which one of the following represents L1 L2* U L1* (A) A (B) B (C) C… Read More
Given a floating point number, write a function to count set bits in its binary representation. For example, floating point representation of 0.15625 has 6 set… Read More
Output of following program? #include <iostream> using namespace std;    template <class T> class Test { private:     T val; public:     static int count;     Test()  {  … Read More
#include<iostream> using namespace std;    class Base { public:     int fun()  { cout << "Base::fun() called"; }     int fun(int i)  { cout << "Base::fun(int i)… Read More
Predict the output of following C++ program. Assume that there is no alignment and a typical implementation of virtual functions is done by the compiler.… Read More
Can a constructor be virtual? Will the following program compile? #include <iostream> using namespace std; class Base { public:   virtual Base() {}    }; int main()… Read More
#include<iostream> using namespace std;    class Base { public:     virtual void show() = 0; };    class Derived: public Base { public:     void show() {… Read More
Predict the output of following program. #include<iostream> using namespace std; class Base { public:     virtual void show() = 0; };    class Derived : public… Read More
Which of the following is true about pure virtual functions? 1) Their implementation is not provided in a class where they are declared. 2) If… Read More
Output of following program #include<iostream> using namespace std;    class Base { public:     virtual void show() { cout<<" In Base \n"; } };    class… Read More
Predict output of the following program #include<iostream> using namespace std;    class Base { public:     virtual void show() { cout<<" In Base \n"; } };… Read More
Given a stream of characters, find the first non-repeating character from stream. You need to tell the first non-repeating character in O(1) time at any… Read More
Hello Everyone!! Recently, I have been through the interview experience of Amazon India and I would like to share my experience with everyone. Position :… Read More