0% found this document useful (0 votes)
11 views2 pages

TCS Ninja Questions Answers

The document provides a comprehensive list of interview questions and answers for TCS Ninja positions, covering topics such as programming basics, object-oriented programming, SQL, and HR questions. It includes explanations of variables, data types, loops, OOP concepts, SQL commands, and personal strengths and weaknesses. This resource is aimed at helping candidates prepare effectively for their interviews.

Uploaded by

el.professor409
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

TCS Ninja Questions Answers

The document provides a comprehensive list of interview questions and answers for TCS Ninja positions, covering topics such as programming basics, object-oriented programming, SQL, and HR questions. It includes explanations of variables, data types, loops, OOP concepts, SQL commands, and personal strengths and weaknesses. This resource is aimed at helping candidates prepare effectively for their interviews.

Uploaded by

el.professor409
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

TCS Ninja Interview Questions with Detailed Answers

Programming Basics
1. What is a variable and how is it declared in C/Java?
Answer: A variable is a named storage that holds data which can be changed during program
execution. In C: int x = 5; In Java: int x = 5;
2. Difference between local and global variables.
Answer: Local variables are declared inside a function and accessible only within it. Global variables
are declared outside functions and accessible throughout the program.
3. Explain different data types in C/Java.
Answer: Common data types: int (integers), float (decimal numbers), char (characters), double
(large decimals), boolean (true/false - Java).
4. What are conditional statements? Give examples.
Answer: Conditional statements allow decision making in programs. Examples: if, if-else, switch.
E.g., if (x > 0) { ... }
5. What are loops? Explain for, while, and do-while loops.
Answer: Loops execute a block of code multiple times. 'for' is used when iteration count is known,
'while' checks condition before loop, 'do-while' checks after execution.

OOP Concepts
1. What is Object-Oriented Programming?
Answer: OOP is a programming paradigm based on the concept of objects that contain data and
methods. It promotes code reuse, modularity, and scalability.
2. What is a constructor?
Answer: A constructor is a special method that initializes objects. It is called automatically when an
object is created.
3. What is method overloading and method overriding?
Answer: Overloading: same method name with different parameters (compile-time). Overriding: child
class redefines parent class method (run-time).
4. What is the difference between interface and abstract class?
Answer: Interface: all methods are abstract by default. Abstract class: can have both abstract and
concrete methods. Java allows multiple interfaces, but only one abstract class.
5. What is a static variable and static method?
Answer: Static variable: shared among all instances of a class. Static method: can be called without
creating an object.

SQL & DBMS


1. What is SQL?
Answer: SQL (Structured Query Language) is used to store, retrieve, and manage data in a
relational database.
2. Write SQL command to select all data from a table.
Answer: SELECT * FROM table_name;
3. Write SQL command to insert data into a table.
Answer: INSERT INTO table_name (column1, column2) VALUES (value1, value2);
4. What are joins in SQL? Explain types with examples.
Answer: Joins combine rows from two or more tables based on related columns. Types: INNER
JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN.
5. What is normalization? Explain 1NF, 2NF, 3NF.
Answer: Normalization reduces redundancy in databases. 1NF: Atomic values. 2NF: No partial
dependency. 3NF: No transitive dependency.

HR Questions
1. Tell me about yourself.
Answer: I'm a recent graduate in Computer Science with a strong interest in software development. I
enjoy problem-solving and have completed academic projects using Java and SQL.
2. Why do you want to join TCS?
Answer: TCS is a reputed company with a great learning environment and global exposure. I want to
grow in such an ecosystem.
3. What are your strengths and weaknesses?
Answer: Strengths: Hardworking, quick learner, team player. Weakness: Public speaking, which I'm
actively improving.
4. Are you open to relocation and working in shifts?
Answer: Yes, I'm flexible with relocation and working in shifts as I understand the job demands.
5. Do you have any questions for us?
Answer: Yes, could you please tell me more about the training and learning opportunities at TCS?

You might also like