Crack Query - Leadership Interview
Home
Google - Engineering Manager Interview Prep
System Design Preparation
Design Patterns
Object Oriented Designing
Thursday, 22 March 2012
Union can not participate in Inheritance
#include<iostream.h>
class A{
public:
int a;
};
//struct B:public A
union B:public A
{
void dis()
{
cout<<a<<endl;
}
};
int main()
{
B a;
a.dis();
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
AWS Data Pipeline Services
https://www.youtube.com/watch?v=tykcCf-Zz1M
Max Contigous subsequence sum
Given n numbers, find out i and j where 1<=i<=j<=n, where the sumof elements from i to j is maximum. All positive : Sum of all ele...
STL : Things to remember
STL Benifits: 1.Code Reuse 2.Efficiancy and Fast 3.Accurate and less buggy 4.Simple code and readable 5.Standardized and helps in writ...
Breadth First Algorithm
Breadth First Algorithm OR Level wise printing of a BST: /* Breadth first traversal using queue */ void BreadthFirstTraversal(Tree *root)...
No comments:
Post a Comment