Trianz
30+ TCS Interview Questions and Answers
Q1. Teradata architecture and what are the performance tuning techniques in teradata
Teradata architecture and performance tuning techniques
Teradata architecture consists of parsing engine, BYNET, access module processors, and storage
Performance tuning techniques include indexing, partitioning, and query optimization
Indexing involves creating indexes on frequently accessed columns
Partitioning involves dividing large tables into smaller ones for faster access
Query optimization involves rewriting queries to reduce resource consumption
Q2. Difference between primary index and secondary index and importance of indexes in teradata
Primary and secondary indexes in Teradata and their importance
Primary index is used for data distribution and is defined at table creation
Secondary index is used for faster access to data and can be added after table creation
Indexes improve query performance by reducing data retrieval time
Indexes can also improve data loading time by reducing the need for full table scans
Choosing the right index type and columns is important for optimal performance
Q3. Write a program to find second most frequent element of a list in O(n) time complexity and maintain the standard of code with Variable names and functions?
Program to find second most frequent element in a list in O(n) time complexity.
Create a dictionary to store the frequency of each element in the list.
Iterate through the list to populate the dictionary.
Find the second highest frequency in the dictionary and return the corresponding element.
Q4. Different types of tables in teradata
Teradata has various types of tables including SET, MULTISET, VOLATILE, GLOBAL TEMPORARY, QUEUE, and NO PRIMARY INDEX tables.
SET tables enforce uniqueness of primary index values.
MULTISET tables allow duplicate primary index values.
VOLATILE tables are temporary and are automatically deleted at the end of a session.
GLOBAL TEMPORARY tables are temporary and can be accessed by multiple sessions.
QUEUE tables are used for message queuing.
NO PRIMARY INDEX tables do not have a prima...read more
Q5. Base core Java programming in string and collections?
Core Java programming concepts related to strings and collections.
Strings in Java are objects of the String class and can be manipulated using various methods like substring, indexOf, and concat.
Collections in Java provide data structures like List, Set, and Map for storing and manipulating groups of objects.
Examples: String str = "Hello"; List
list = new ArrayList<>();
Q6. Docker image building using docker compose
Docker Compose simplifies building Docker images by defining services and dependencies in a YAML file.
Docker Compose allows defining multiple services and their dependencies in a single YAML file
Each service can have its own Dockerfile or use an existing image
Dependencies between services can be defined using the 'depends_on' keyword
Images can be built using the 'docker-compose build' command
Example: docker-compose.yml file defining a web service and a database service
Q7. In which case we use JsonP data type
JsonP data type is used for cross-domain requests in web development.
Used for making cross-domain requests in web development
Allows retrieving data from a different domain than the one the website is hosted on
Commonly used in AJAX requests
Q8. What is the Difference Between Array and Arraylist
Array is a fixed size data structure while ArrayList is a dynamic size data structure.
Array is a primitive data type while ArrayList is a class in Java.
Array can hold both primitive and object types while ArrayList can only hold object types.
Array uses [] brackets to declare while ArrayList uses ArrayList<>.
Array has a fixed size while ArrayList can dynamically increase or decrease in size.
Array is faster than ArrayList for accessing elements while ArrayList is faster for add...read more
Q9. Difference between intermediate and terminal operations in stream
Intermediate operations return a stream and do not produce a result, while terminal operations produce a result.
Intermediate operations are lazy and do not execute until a terminal operation is called
Examples of intermediate operations include filter(), map(), and sorted()
Examples of terminal operations include forEach(), reduce(), and collect()
Terminal operations are eager and execute immediately
Q10. details of types of data structures
Data structures are ways to organize and store data in a computer so that it can be accessed and manipulated efficiently.
Types include arrays, linked lists, stacks, queues, trees, graphs, hash tables, and more
Arrays store elements of the same data type in contiguous memory locations
Linked lists consist of nodes where each node points to the next node in the sequence
Stacks follow the Last In First Out (LIFO) principle
Queues follow the First In First Out (FIFO) principle
Trees h...read more
Q11. Can we compare strings and characters
Yes, strings are made up of characters and can be compared based on their values.
Strings can be compared using comparison operators like ==, !=, <, >, etc.
Characters within strings can also be compared individually.
Example: 'hello' == 'hello' would return true.
Q12. Searching and sorting algorithm
Searching and sorting algorithms are essential in software development for efficiently organizing and retrieving data.
Common searching algorithms include linear search, binary search, and hash tables.
Common sorting algorithms include bubble sort, selection sort, merge sort, and quick sort.
Efficiency of algorithms is measured in terms of time complexity (Big O notation).
Choosing the right algorithm depends on the size of the data and the specific requirements of the applicatio...read more
Q13. What are pointers
Pointers are variables that store memory addresses of other variables in programming languages like C, C++, and Java.
Pointers are used to store memory addresses of variables instead of their actual values.
They allow for direct manipulation of memory locations, enabling more efficient memory management.
Pointers are commonly used in data structures like linked lists, trees, and graphs.
Example: int *ptr; // declaring a pointer variable
Q14. What do you understand by Oops? Pillars of Oops.
Oops stands for Object-Oriented Programming. Pillars of Oops include Inheritance, Encapsulation, Abstraction, and Polymorphism.
Oops stands for Object-Oriented Programming
Pillars of Oops include Inheritance, Encapsulation, Abstraction, and Polymorphism
Inheritance allows a class to inherit properties and behavior from another class
Encapsulation restricts access to certain components within a class
Abstraction hides the complex implementation details and only shows the necessary ...read more
Q15. 4 pillars in OOPS , Swapping problem explain
4 pillars in OOPS are Inheritance, Encapsulation, Abstraction, and Polymorphism. Swapping problem involves exchanging values of two variables without using a temporary variable.
4 pillars in OOPS: Inheritance, Encapsulation, Abstraction, Polymorphism
Swapping problem: Exchange values of two variables without using a temporary variable
Example: Swapping two variables a and b without using a temporary variable: a = a + b; b = a - b; a = a - b;
Q16. how authentication work for web api
Authentication for web API involves verifying the identity of users before granting access to resources.
Authentication can be done using tokens like JWT or OAuth.
API endpoints can be secured using authentication middleware.
User credentials are validated against a data store like a database.
Authentication headers like Authorization are used to send tokens with requests.
Q17. What all tools do you use related to SAAS platform.
Q18. Kubernetes architecture explanation
Kubernetes is a container orchestration platform that automates deployment, scaling, and management of containerized applications.
Kubernetes uses a master-slave architecture with a control plane and worker nodes.
The control plane manages the overall state of the cluster and schedules workloads to worker nodes.
Worker nodes run the containers and report back to the control plane.
Kubernetes uses declarative configuration to define desired state and automatically reconcile with a...read more
Q19. Rest api one complete flow?
A REST API flow involves sending a request to a server, processing the request, and receiving a response.
Client sends a request to the server
Server processes the request and performs necessary actions
Server sends a response back to the client
Example: Client sends a GET request to retrieve user data from a server
Q20. Outline project management approach
My project management approach involves thorough planning, clear communication, effective delegation, and continuous monitoring and adjustment.
Thoroughly plan project scope, timeline, budget, and resources
Communicate clearly with team members, stakeholders, and clients
Delegate tasks effectively based on team members' strengths and expertise
Monitor project progress regularly and make adjustments as needed
Use project management tools and software to streamline processes
Implemen...read more
Q21. What is ArrayList
ArrayList is a dynamic array that can grow or shrink in size during runtime.
It is a part of Java Collections Framework.
It can store objects of any type.
It provides methods to add, remove, and access elements.
It is faster than traditional arrays for inserting and deleting elements.
Example: ArrayList
names = new ArrayList<>(); names.add("John"); names.add("Mary"); names.remove(0);
Q22. How do maps work
Maps work by using a combination of satellite imagery, GPS data, and mapping algorithms to display geographical information.
Maps use satellite imagery to provide visual representation of the Earth's surface
GPS data is used to accurately pinpoint locations on the map
Mapping algorithms are used to calculate routes, distances, and other geographical information
Examples: Google Maps, Apple Maps, Waze
Q23. Java8 program s?
Java8 introduced several new features like lambda expressions, functional interfaces, streams, and default methods.
Lambda expressions allow you to write more concise code by providing a way to pass functions as arguments.
Functional interfaces are interfaces with a single abstract method, which can be implemented using lambda expressions.
Streams provide a way to process collections of objects in a functional style.
Default methods allow interfaces to have method implementations...read more
Q24. how to configure DI services
DI services can be configured in .NET by registering services in ConfigureServices method of Startup class
Register services using AddTransient, AddScoped, or AddSingleton methods
Use IServiceCollection interface to add services
Example: services.AddTransient<IMyService, MyService>()
Q25. How to migrate premises to cloud
Migrating premises to cloud involves planning, data migration, testing, and deployment.
Assess current infrastructure and data to determine what can be migrated
Choose a cloud provider and plan the migration process
Migrate data and applications to the cloud
Test the migrated data and applications to ensure functionality
Deploy the migrated premises to the cloud
Q26. Small output type program implementation
Implementing a small output type program involves writing code to achieve a specific task or calculation.
Define the problem statement and expected output clearly
Choose the appropriate programming language and tools
Write the code to perform the required task
Test the program with sample inputs to ensure correctness
Optimize the code for efficiency if needed
Q27. What is Agile Methodology?
Agile Methodology is a project management approach that emphasizes flexibility, collaboration, and incremental development.
Agile involves breaking down projects into small, manageable tasks called sprints.
It prioritizes customer feedback and collaboration throughout the development process.
Adaptability and responding to change are key principles of Agile.
Common Agile frameworks include Scrum, Kanban, and Extreme Programming (XP).
Q28. how to handle CORS
CORS can be handled by configuring the server to allow cross-origin requests from specified origins.
Configure server to include appropriate CORS headers like Access-Control-Allow-Origin
Use middleware or filters to handle CORS in .NET applications
Consider security implications when allowing cross-origin requests
Q29. Challenges faced while automation
Some challenges faced in automation testing include dynamic elements, synchronization issues, and maintenance of test scripts.
Handling dynamic elements on the webpage
Synchronization issues between test scripts and application
Maintenance of test scripts as the application evolves
Q30. Agile methodologies and the ceremony
Agile methodologies are a set of principles and practices that promote iterative development and collaboration.
Agile methodologies focus on delivering working software in short iterations.
The ceremonies in Agile include daily stand-up meetings, sprint planning, sprint review, and retrospective.
These ceremonies help teams stay aligned, prioritize work, gather feedback, and continuously improve.
Examples of Agile methodologies include Scrum, Kanban, and Extreme Programming.
Q31. Error handling using express
Error handling in Express involves using middleware functions to catch and handle errors.
Use try-catch blocks in route handlers to catch synchronous errors
Use next function in middleware to pass errors to error handling middleware
Create a custom error handling middleware to handle errors globally
Use status codes and error messages to communicate errors to clients
Q32. Middleware in .Net core
Middleware in .NET Core is a component that can handle requests and responses in the application pipeline.
Middleware is a piece of software that can intercept and process HTTP requests and responses.
Middleware components are added to the application pipeline in the Startup class.
Middleware can perform tasks such as authentication, logging, error handling, etc.
Example: UseMiddleware<CustomMiddleware>()
Q33. What micro services
Microservices are a software development technique where applications are broken down into smaller, independent services that work together.
Microservices are small, independent services that can be developed, deployed, and scaled independently.
Each microservice typically focuses on a specific business function and communicates with other services through APIs.
Microservices promote flexibility, scalability, and resilience in software development.
Examples of companies using mic...read more
Q34. What is spring boot
Spring Boot is a framework that simplifies the development of Java applications by providing pre-configured settings and tools.
Spring Boot eliminates the need for manual configuration by providing defaults for most settings.
It allows for the creation of stand-alone, production-grade Spring-based applications.
Spring Boot includes embedded servers like Tomcat, Jetty, or Undertow for easy deployment.
It promotes convention over configuration, reducing the amount of boilerplate co...read more
Interview Process at TCS
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month