TCS
20+ Micro Labs Interview Questions and Answers
Q1. Tell about oops concepts What is inheritance? Is multiple inheritance possible in java? What is mutable in java? What is the function of malloc, calloc etc? Difference between delete and truncate? And many more
Questions on OOPs concepts, inheritance, mutable in Java, memory allocation functions, and difference between delete and truncate.
Inheritance is a mechanism in OOPs where a class can inherit properties and methods from another class.
Java supports single inheritance but not multiple inheritance.
Mutable in Java refers to objects whose state can be modified after creation.
Malloc and calloc are memory allocation functions in C programming.
Delete is a SQL command used to remove ro...read more
Q2. Difference between c and c++ What is pointer? Introduction Why tcs? your role in project?
Difference between C and C++, pointer definition and usage
C++ is an object-oriented language while C is procedural
C++ supports function overloading and templates while C does not
Pointers are variables that store memory addresses
Pointers are used for dynamic memory allocation and passing parameters by reference
Example: int *ptr; // declares a pointer to an integer variable
Q3. What is Java and how itis best language and what are the benefits of the language
Java is a high-level programming language known for its portability, security, and versatility.
Java is platform-independent, meaning it can run on any device with a Java Virtual Machine (JVM).
It is known for its strong security features, such as automatic memory management and built-in exception handling.
Java is versatile, with a wide range of applications including web development, mobile apps, and enterprise software.
The language is object-oriented, making it easier to orga...read more
Q4. What is a heap and what is base structure is used to build it?
A heap is a data structure used to store and manage dynamically allocated memory.
A heap is a region of memory that is managed by the operating system.
It is used to store data that is allocated dynamically at runtime.
The base structure used to build a heap is typically a binary tree.
Heap operations include allocating and deallocating memory, and sorting data.
Examples of languages that use heaps include C, C++, and Java.
Q5. Why is java called object oriented programming language
Java is called object oriented programming language because it is designed to use objects and classes to organize and structure code.
Java is based on the concept of objects, which are instances of classes
Classes define the properties and behaviors of objects
Java supports encapsulation, inheritance, and polymorphism, which are key features of object-oriented programming
Example: A Java program for a bank might have classes for customers, accounts, and transactions
Objects of the...read more
Q6. Why is pega different from conventional programming
Pega is different from conventional programming because it is a low-code platform that allows for rapid development and easy customization.
Pega uses a visual development environment with drag-and-drop components, making it easier for non-programmers to create applications.
Pega's rules-based architecture allows for quick changes and updates without extensive coding.
Pega focuses on business processes and rules rather than traditional coding, making it more aligned with business...read more
Q7. Write a code to check a number is palindrome or not.
Code to check if a number is a palindrome or not.
Convert the number to a string to easily check for palindrome
Reverse the string and compare it with the original string to check for palindrome
If the reversed string is equal to the original string, then the number is a palindrome
Q8. Write a program to reverse a string without using in built functions?
Program to reverse a string without using in-built functions
Create a new empty string to store the reversed string
Iterate through the original string from end to start and append each character to the new string
Print or return the reversed string
Q9. which programming language are do you know?
I am proficient in multiple programming languages including Java, Python, and C++.
Proficient in Java, Python, and C++
Experience with web development languages such as HTML, CSS, and JavaScript
Familiarity with scripting languages like Bash and PowerShell
Knowledge of database languages like SQL and NoSQL
Experience with version control systems like Git
Q10. What is object oriented programming language
Object oriented programming language is a programming paradigm that uses objects to represent data and methods.
It focuses on encapsulation, inheritance, and polymorphism.
Examples include Java, C++, Python, and Ruby.
Objects have attributes (data) and methods (functions).
Q11. what are the type of process in data analysis
The types of processes in data analysis include data collection, data cleaning, data transformation, data modeling, and data visualization.
Data collection involves gathering raw data from various sources.
Data cleaning is the process of identifying and correcting errors in the data.
Data transformation involves converting raw data into a format suitable for analysis.
Data modeling is the process of creating mathematical models to make predictions or decisions based on the data.
D...read more
Q12. Code or logic to blink red and blue bulb alternatively
Code to blink red and blue bulb alternatively
Use a loop to alternate between turning on and off the red and blue bulbs
Use a delay function to control the timing of the blinking
Toggle the state of the bulbs using a boolean variable
Q13. How to reverse a string
To reverse a string, iterate through it in reverse order and append each character to a new string.
Create an empty string to store the reversed string
Iterate through the original string in reverse order
Append each character to the new string
Return the new string
Q14. What is a foreign key
A foreign key is a column or set of columns in a database table that refers to the primary key of another table.
It establishes a link between two tables in a relational database.
It ensures referential integrity between the tables.
It can be used to join tables in a query.
Example: CustomerID in Orders table refers to the CustomerID in Customers table.
Q15. What are all different rules in pega
There are various rules in Pega such as validation rules, decision rules, data transform rules, etc.
Validation rules ensure data entered by users meets specified criteria
Decision rules determine the logic for decision-making in the application
Data transform rules define how data is transformed from one format to another
UI rules control the appearance and behavior of user interfaces
Integration rules define how the application interacts with external systems
Q16. what is OOPM? what are network topologies?
OOPM stands for Object-Oriented Programming Methodology. Network topologies refer to the physical or logical layout of a network.
OOPM is a programming paradigm that focuses on objects and their interactions.
It emphasizes encapsulation, inheritance, and polymorphism.
Examples of OOPM languages include Java, C++, and Python.
Network topologies include bus, star, ring, mesh, and hybrid.
They determine how devices are connected and communicate with each other.
Each topology has its o...read more
Q17. Comparison between languages php and python
Comparison between PHP and Python
PHP is a server-side scripting language while Python is a general-purpose language
PHP is faster for web development while Python is better for data analysis and machine learning
PHP has a larger community and more resources available while Python has a simpler syntax and is easier to learn
PHP is used for popular CMS like WordPress while Python is used for scientific computing and AI applications
Q18. Explain about method overloading?
Method overloading is when multiple methods in a class have the same name but different parameters.
Allows a class to have multiple methods with the same name but different parameters
Parameters can differ in number, type, or order
Compile-time polymorphism
Example: void print(int a), void print(int a, int b)
Q19. Explain about inheritance?
Inheritance is a concept in object-oriented programming where a class can inherit attributes and methods from another class.
Allows a class to inherit attributes and methods from another class
Promotes code reusability and reduces redundancy
Creates a parent-child relationship between classes
Derived class can access all public and protected members of the base class
Example: Class 'Car' can inherit from class 'Vehicle'
Q20. Explain diff -- Set vs Map
Set and Map are both data structures in Java, but Set stores unique elements while Map stores key-value pairs.
Set does not allow duplicate elements, while Map allows duplicate values but not duplicate keys.
In Set, elements are stored in an unordered manner, while in Map, key-value pairs are stored.
Example: Set
set = new HashSet<>(); Map map = new HashMap<>();
Q21. describe the project in 5 min
Developed a web-based inventory management system for a retail company
Used Java and Spring framework for backend development
Implemented responsive design using HTML, CSS, and JavaScript for frontend
Integrated with third-party APIs for payment processing and order tracking
Q22. Even and odd Code in python.
Even and odd code in Python separates numbers into even and odd categories.
Create two empty lists, one for even numbers and one for odd numbers.
Iterate through the input list of numbers and append each number to the appropriate list based on its parity.
Return the two lists containing even and odd numbers respectively.
Q23. What are pointers?
Pointers are variables that store memory addresses of other variables or functions.
Pointers allow for dynamic memory allocation and manipulation.
They are commonly used in programming languages like C and C++.
Example: int *ptr; // declares a pointer variable that can store the memory address of an integer variable
Dereferencing a pointer means accessing the value stored at the memory address it points to.
Example: int x = 5; int *ptr = &x; // assigns the memory address of x to p...read more
Q24. Explain Java 8 Feature
Java 8 introduced several new features including lambda expressions, functional interfaces, streams, and default methods.
Lambda expressions allow you to pass functionality as an argument to a method.
Functional interfaces have a single abstract method and can be used with lambda expressions.
Streams provide a way to work with sequences of elements efficiently.
Default methods allow interfaces to have method implementations.
Example: Lambda expression - (a, b) -> a + b
Example: Fun...read more
Q25. write query to find leap year
Query to find leap year in SQL
Use modulo operator (%) to check if year is divisible by 4
If year is divisible by 100, also check if it is divisible by 400
Return years that meet both conditions as leap years
Q26. What is inheritance?
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows for code reuse and promotes a hierarchical organization of classes.
The existing class is called the superclass or parent class, while the new class is called the subclass or child class.
The subclass inherits all the properties and methods of the superclass, and can also add new properties and methods or override existing ones....read more
Q27. What is bubble sort?
Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Bubble sort is a comparison-based algorithm.
It works by comparing each pair of adjacent elements and swapping them if they are in the wrong order.
It has a worst-case and average-case time complexity of O(n^2).
Example: [5, 3, 8, 4, 2] -> [3, 5, 4, 2, 8] -> [3, 4, 2, 5, 8] -> [3, 2, 4, 5, 8] -> [2, 3, 4, 5, 8]
Q28. Define optimization in SQL
Optimization in SQL refers to the process of improving the performance of SQL queries by minimizing resource usage and maximizing efficiency.
Optimization involves creating efficient query plans to retrieve data from databases.
Indexing can be used to optimize queries by reducing the number of rows that need to be scanned.
Using appropriate join methods and avoiding unnecessary subqueries can also improve query performance.
More about working at TCS
Top HR Questions asked in Micro Labs
Interview Process at Micro Labs
Top Associate Systems Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month