All Medium Articles
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… Read More
Output of following program? filter_none edit close play_arrow link brightness_4 code #include <iostream> using namespace std;    template <class T> class Test { private:     T… Read More
filter_none edit close play_arrow link brightness_4 code #include<iostream> using namespace std;    class Base { public:     int fun()  { cout << "Base::fun() called"; }     int… 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? filter_none edit close play_arrow link brightness_4 code #include <iostream> using namespace std; class Base {… Read More
filter_none edit close play_arrow link brightness_4 code #include<iostream> using namespace std;    class Base { public:     virtual void show() = 0; };    class Derived:… Read More
Predict the output of following program. filter_none edit close play_arrow link brightness_4 code #include<iostream> using namespace std; class Base { public:     virtual void show() =… 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 filter_none edit close play_arrow link brightness_4 code #include<iostream> using namespace std;    class Base { public:     virtual void show() { cout<<"… Read More
Predict output of the following program filter_none edit close play_arrow link brightness_4 code #include<iostream> using namespace std;    class Base { public:     virtual void show()… 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
filter_none edit close play_arrow link brightness_4 code #include<iostream> using namespace std;    class Base { public:     void show()     {         cout<<" In Base ";     } };… 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
Online round: 1. There exist a binary tree with each node containing a character (lower case letters for leaf nodes and upper case letters for… Read More
Given a directed graph and two vertices in it, source ‘s’ and destination ‘t’, find out the maximum number of edge disjoint paths from s… Read More
itoa function converts integer into null-terminated string. It can convert negative numbers too. The standard definition of itoa function is give below:- filter_none edit close… Read More
Given a binary tree, a complete path is defined as a path from root to a leaf. The sum of all nodes on that path… Read More
filter_none edit close play_arrow link brightness_4 code #include<iostream>     using namespace std; class P { public:    void print()  { cout <<" Inside P"; } };… Read More
Predict the output? filter_none edit close play_arrow link brightness_4 code #include<stdlib.h> #include<stdio.h> #include<iostream>    using namespace std;    class Test {     int x; public:     void*… Read More
NetApp is a leading company of innovative storage and data management solutions that helps organizations around the world store, manage, protect, and retain their data.… Read More