Technical Interview Questions and Answers :: Sapient


Tot. Mock Test: 0

Total Qs: 70+

  •  Select All
  •  SQL
  •  Java
  •  C++
  •  Informatica
  •  Operating System
  •  Soft. Engineering
  •  DBMS
  •  C
  •  HR Question in TR
  •  Data Structure
  •  HTML
  •  PHP

    11 / 70

    What is function overloading and operator overloading?

    Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This capability is called function overloading. When an overloaded function is called, the C++ compiler elects the proper function by examining the number, types and order of the arguments in the call. Function overloading is commonly used to create several functions of the same name that perform similar tasks but on different data types.

    Operator overloading allows existing C++ operators to be redefined so that they work on objects of user-defined classes. Overloaded operators are syntactic sugar for equivalent function calls. They form a pleasant facade that doesn't add anything fundamental to the language (but they can improve understand ability and reduce maintenance costs).

    Please Login First :

    12 / 70

    What is polymorphism? Explain with an example?

    Single entity showing multiple behaviours.
    Example: Mobile can be used to take photos , internet usage,text documents creation etc.,
    Two types of polymorphism 1.static polymorphism ( method over riding)
    2. Dynamic polymorphism ( method over loading)

    Please Login First :

    13 / 70

    What is virtual functions, and explain with an example?

    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.

    Please Login First :

    14 / 70

    Can Primary key is a Foreign Key on the same table?

    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.

    Please Login First :

    The PRIMARY KEY is the column(s) used to uniquely identify each row of a table.

    Please Login First :

    16 / 70

    What is a FOREIGN KEY?

    A FOREIGN KEY is one or more columns whose values are based on the PRIMARY or CANDITATE KEY values from the database.

    Please Login First :

    A UNIQUE KEY is one or more columns that must be unique for each row of the table.

    Please Login First :

    18 / 70

    All types of join. What is, and how to use with example

    No Discussion on this question yet!

    Please Login First :

    The domain of an attribute must include only atomic (simple, indivisible) values.

    Please Login First :

    20 / 70

    What is Fully Functional dependency?

    It is based on the concept of full functional dependency. A functional dependency X -> Y is full functional dependency if removal of any attribute A from X means that the dependency does not hold any more.

    Please Login First :

Most Frequent Qs.