Technical Interview Questions and Answers :: Sapient
- Select All
- SQL
- Java
- C++
- Informatica
- Operating System
- Soft. Engineering
- DBMS
- C
- HR Question in TR
- Data Structure
- HTML
- PHP
21 / 70
A pure virtual member function is a member function that the base class forces derived classes to provide. Normally these member functions have no implementation. Pure virtual functions are equated to zero.
class Shape { public: virtual void draw() = 0; };
22 / 70
A virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually of the derived class, even if the object is accessed by a base pointer rather than a derived pointer. This allows algorithms in the base class to be replaced in the derived class, even if users don't know about the derived class.
23 / 70
USED TO CONVERT HIERACHICAL STRUCTURE TO THE FLAT STRUCTURE. IT IS USED TO JOIN A TABLE ITSELF AS LIKE IF THAT IS THE SECOND TABLE
24 / 70
No Discussion on this question yet!
25 / 70
No Discussion on this question yet!
26 / 70
Yes, Consider a category table in a e-commerce web site.
Category_Id, Category_Name, Parent_Category_ID. In this table all the parent categories are also categories. When we create a self join category id will be treated as foreign key to the same table.
27 / 70
The PRIMARY KEY is the column(s) used to uniquely identify each row of a table.
28 / 70
A FOREIGN KEY is one or more columns whose values are based on the PRIMARY or CANDITATE KEY values from the database.
29 / 70
A UNIQUE KEY is one or more columns that must be unique for each row of the table.
30 / 70
The domain of an attribute must include only atomic (simple, indivisible) values.