Please wait...

Technical Interview Questions and Answers :: TCS

Company: TCS

Total Qs: 156+

Website: http://www.tcs.com

Total View: 63.92K

Co. Cloud

Topics List

  •  Select All
  •  SQL
  •  Java
  •  C++
  •  WebMethod
  •  Informatica
  •  C
  •  DBMS
  •  Operating System
  •  Soft. Engineering
  •  Data Structure
  •  Networking
  •  Hadoop
  •  HR Question in TR
    Question :: 1
    Wha is difference between DDL and DML command?
    Answer:

    DDL stands for Data Definition Language. DML stands for Data Manipulation Language. DDL commands are used to create,alter,truncate,drop,rename etc. Where DML are used to insert,update,delete,merge etc.,

    Please Login First :

    Tags: TCS

    Question :: 2
    What is self join?
    Answer:

    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

    Please Login First :
    Question :: 3
    What are the principle concepts of OOPS?
    Answer:

    1. Abstraction
    2. Encapsulation
    3. Inheritance
    4. Polymorphism
    5. Classes and Object

    Please Login First :
    Question :: 4
    What is method overloading and overriding?
    Answer:

    Method Overloading:
    A method with changed formal parameters will lead to implementing method overloading.
    int calculateSum(int i,int j)
    float calculateSum(float i,int j)
    double calculateSum(double i,int j)
    float calculateSum(int i,float j)

    Method Overriding:
    The method with the same signature but with changed implementation lead to method overriding and that can occur in a parent child relation of classes. A method defined in parent class can be overridden in its child class with different implementation from its base class.
    1. Pointers are supported in C++ while not in Java. The memory management is done automatically with help of part of JVM called Garbage Collector.
    2. Multiple inheritance is not supported in Java but supported in C++.
    3. There are no structures and unions in Java.
    4. There is no scope resolution operator in Java (::).
    5. There are no destructors in Java like C++.
    6. There is no virtual keyword in Java because all non-static method use dynamic binding.

    Please Login First :
    Question :: 5
    Why multiple inheritance is not supported in java?
    Answer:

    Multiple inheritence is not supported in Java because of ambuiguity that it causes.

    Please Login First :
    Question :: 6
    What is Exception Handling? What is difference between Checked Exception and Unchecked Exception?
    Answer:

    An exception is a problem that arisesduring excecution. Checked exceptions are the exceptions that gets checked at the compile time. Unchecked exceptions are not checked at compile time, in Java all exceptions are unchecked exceptions.

    Please Login First :
    Question :: 7
    What is a container class?
    Answer:

    Container class is a class that hold group of same or mixed objects in memory. It can be heterogeneous and homogeneous. Heterogeneous container class can hold mixed objects in memory whereas when it is holding same objects, it is called as homogeneous container class.

    Please Login First :
    Question :: 8
    What are limitations of union?
    Answer:

    This means if one member variable of union is updated then the rest will be updated as well. This also leads compilation error when initializing multiple members at a time as the memory locations are not different. So in case of union only one member should be initialized at a time.

    Please Login First :
    Question :: 9
    How can we access private members of a classs?
    Answer:

    By using a friend function.
    A friend function has access to all private and protected members of the class for which it is a friend.

    Please Login First :
    Question :: 10
    What are the differences between C and C++?
    Answer:

    1. C can run most of the code of C, but C can't run C code.



    2. C supports procedural programming paradigm whereas C supports both procedural and object oriented programming paradigm.



    3. C is a function driven and C is an object driven language.



    4. C doesn't allow function definitions within structures whereas in C function definition can be within structures.



    5. C doesn't support reference variables but C does support. 

    Please Login First :