Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
Practice Tech Mahindra Essay Topics

Technical Interview Questions and Answers :: TCS

281.22K

Tot. Mock Test: 40


Total Qs: 157+

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

    81 / 157

    What are storage memory, default value, scope and life of Automatic and Register storage class?
    Answer:

    No Discussion on this question yet!

    Please Login First :

    82 / 157

    What is local, static and global variable? and their default values.
    Answer:

    No Discussion on this question yet!

    Please Login First :

    83 / 157

    What are the principle concepts of OOPS?
    Answer:

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

    Please Login First :

    84 / 157

    Can we implement all the concepts of OOPS using the keyword struct?
    Answer:

    Yes, struct is similar to class, only all attributes/methods are public by default in the struct. You can very well have methods and attributes in a struct. You can also inherit from a struct (default inheritance is public).

    Please Login First :

    85 / 157

    What are the differences between a structure and a union?
    Answer:

    Structure- It is an user defined data function that allow to store multiple type of data in a single unit.



    It occupies sum of memory of all location.



    Whereas, Union- It is also an user defined data function that allow to store multiple type of data in a single unit.



    But it occupies memory of largest member only. 

    Please Login First :

    86 / 157

    What was your subject in 6th and 7th semester?
    Answer:

    No Discussion on this question yet!

    Please Login First :

    87 / 157

    What is page fault?
    Answer:

    No Discussion on this question yet!

    Please Login First :

    88 / 157

    Difference between Structure & Array.
    Answer:

    Structure is the user defined data type which contain different datatype in single unit.

    Array contain the similar type of data in single unit of block.

    Please Login First :

    89 / 157

    If you are not selected in TCS, How would you fell?
    Answer:

    No Discussion on this question yet!

    Please Login First :

    90 / 157

    Write a JDBC program to retrieve student details?
    Answer:

    import java.sql.*;


    public class stuinfo{


    public static void main(String ar[]){


    try[


    class.forName("sun.jdbc.odbc.JdbcOdbcDriver");


    Connection con=DriverManager.getConnection("Jdbc:Odbc:stu");


    Statement st=con.createStatement();


    ResultSet rs=st.excecuteQuery("select * from studin");


    while(rs.next()){


    String name=rs.getString(1);


    String rollno=rs.getString(2);


    int m1=rs.getInt(3);


    int m2=rs.getInt(4);


    int m3=rs.getInt(5);


    String dept=rs.getString(6);


    int year=rs.getInt(7);


    System.out.ptintln("Name:" name);


    System.out.ptintln("Roll No.:" rollno);


    System.out.ptintln("Marks1 :" m1);


    System.out.ptintln("Marks2 :" m2);


    System.out.ptintln("Marks3 :" m3);


    System.out.ptintln("Department :" dept);


    System.out.ptintln("Year :" year);


    }


    }catch(Exception e){System.out.println ("Exception" e);}


    }


    }

    Please Login First :

TCS off campus experience, TCS off campus interview, TCS tr interview questions, why TCS interview question, TCS values explanation, TCS off campus interview experience


Most Frequent Qs.