[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Technical Interview Questions and Answers :: TCS

391.12K

Tot. Mock Test: 40


Total Qs: 158+

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

    101 / 158

    What is cache memory?
    Answer:

    No Discussion on this question yet!

    Please Login First :

    102 / 158

    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 :

    103 / 158

    What is meant by exception?
    Answer:

    Some peculiar problems other than logic or syntax errors, they are known as exceptions. Exceptions are run-time anomalies or unusual conditions that a program may encounter while executing. Anomalies might include the condition such a division by zero, array outside of bound etc.

    Please Login First :

    104 / 158

    What is meant by exception handling mechanism?
    Answer:

    Exception handling mechanism is basically built upon through keywords namely try, catch, and throw. The keyword try is used to preface a block of statements which may generate an exception. This block of statements is known as try block. When an exception is detected, it is thrown using a throw statement in the try block. A catch statement is defined by the keyword catch “catches” the exception thrown by the throw statement in the try block.

    Please Login First :

    105 / 158

    What are the purpose of the exception handling?
    Answer:

    The purpose of exception handling mechanism is to provide means to detect and report an “exception circumstance”. So that appropriate action can be taken. The mechanism suggests a separate error handling code that performs the following tasks.
    1. Find the problem (hit the exception).
    2. Inform than an error has occurred (throw the exception).
    3. Receives the error information (catch the exception).
    4. Take corrective action (handle the exception).

    Please Login First :

    106 / 158

    How does the overloading function performs in handles?
    Answer:

    Overloading -> enables a handle to gain control and do some work on each access to an object.

    Please Login First :

    107 / 158

    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 :

    108 / 158

    Explain overloading the delete operator.
    Answer:

    Syntax:

    void operator delete(void *p)
    {
    /*free memory pointed to by p. the destructor is called automatically.*/
    }

    The delete function receives a pointer to the region of memory to be freed. It then releases the previously allocated memory back to the system. When an object is deleted, its destructor is automatically called.

    Please Login First :

    109 / 158

    Explain overloading the new operator.
    Answer:

    Syntax:
    void *operator new (size_t size)
    {
    /*performs the allocation operation.
    The constructor is called automatically.
    returns the pointer to memory*/
    }
    size_t - It is a defined type capable of containing the largest single piece of memory that can be allocated.
    Size - It contains the number of bytes needed to hold the object being allocated.
    When we allocate an object using new, the object’s constructor is automatically called.

    Please Login First :
    Answer:

    Two or more functions can share the same name that perform a variety of different tasks as long as their parameter declarations are different. The functions that share the same name are said to be overloaded, and the process is referred to as function overloading.

    Please Login First :

TCS technical interview experience, TCS technical interview question, TCS technical interview questions, TCS technical interview questions and answers, TCS technical interview questions for cse, TCS technical interview questions for freshers, TCS technical interview questions on c, TCS technical questions and answers, TCS technical round, TCS technical round questions, TCS technical round questions for ece, TCS telephonic interview


Most Frequent Qs.