Section 1: React
1.Explain what JSX is and how it differs from regular HTML.
JSX is Javascript XML. It allows you to write HTML like code in javascript files. Usually used in
react to define UI components in more readable way.
Difference: attributes are camelCase in JSX while in HTML they are lowercase. E.g. JSX:
className, onClick HTML: class, onclick
2. Describe how React's `useState` and `useEffect` hooks work. Provide simple examples.
useState returns an array which contains: current state value, function to update state. E.g.
Const [count, setCount]= useState(0); Here 0 represents the initial value of count
useEffect allows to perform side effects in functional components like fetching data. E.g.
useEffect(){//code to fetch data,[count]} Here useEffect will get called everytime count gets
updated. It is called as dependency array. If dependency array is empty useEffect will get
called only at first time when component will render. If dependency array is not present then
useEffect will get called everytime component renders.
3.Explain how context API works in React and provide an example use case.
Context API allows you to share state globally across components. It is one of the solution to
prop drilling problem. It is used when multiple components needs the same data. So no need
to pass props from parent to child. Component who needs data will access it globally.
4.Describe the lifecycle methods in class components and their functional equivalents using hooks.
1. Mounting Phase
Class component: constructor() //it initialize the state
componentDidMount() //runs after first render
Functional component: useState() hook, useEffect() with empty dependency
array
2. Updating Phase (Re-rendering)
Class: componentDidUpdate(prevProps, prevState) // runs after re-render
when props or state change.
Functional: useEffect(() => {….}, [dependency]) //runs when any one value in
dependency array changes
3. Unmounting Phase:
Class: componentWillUnmount() //runs before component is removed
Functional:
5.Explain how you would implement lazy loading of components in React.
Lazy loading is a technique used to dynamically load components only when they are
needed. It improves the performance by reducing the initial bundle size.
1. Use React.lazy() to import the compoenent
const MyComponent = React.lazy(() => import('./MyComponent'));
2. Wrap it inside Suspense to show a fallback (like a loading message) until it loads:
<Suspense fallback={<div>Loading...</div>}>
<MyComponent />
</Suspense>
6.What is the purpose of React's `React.StrictMode`?
It intentionally calls the components twice. It activates additional checks and warnings
7.How do you handle form validation in React?
To handle form validation we can use react-hook-form library. No need to manually handle
form states. It supports built-in and custom validation rules.
8.Explain the difference between `componentDidMount` and `componentWillUnmount` in class
components.
componentDidMount: Runs after the component is inserted into the DOM
componentsWillUnmount: Runs just before the component is removed from the DOM
9.Explain the role of `Redux` in state management in large React applications.
Redux is state management library used in large React applications to manage global state
efficiently. It is used to solve problem of prop drilling. It has centralized global storage. It
makes the communication between components easier
Section 2: React Query & Unit Testing
1.What is React Query and how does it simplify data fetching and caching in React applications?
React query automates the re-fetching , caching and background updates unlike useState()
and useEffect hook. It uses useQuery() hook to fetch data from API. It handles loading, error
and success states automatically. Stores API responses in memory to reduce unnecessary API
calls
2.Describe the basic concept of `useQuery` and `useMutation` in React Query.
useQuery() automatically fetches data when the component mounts and refetches when
needed.. It handles loading, error and success states automatically. Stores API responses in
memory to reduce unnecessary API calls
useMutation is used for creating, updating and deleting data. It does not run automatically
like useQuery, it needs to be triggered manually
3.How does React Query handle background fetching and refetching data?
By default, React Query refetches data when component remounts, after switching tabs,
network reconnects after going offline. We can manually trigger refetching when needed
using refetch() function
4.How would you test a React component that fetches data from an API using React Testing
Library?
Mock the API call using Jest (this means creating a fake response instead of calling a real API)
Render the component in the test.
Check if the loading message appears first (to ensure the component shows a loading state
while waiting for data).
Wait for the data to appear using waitFor(), which helps handle the delay of fetching data.
Verify that the fetched data is displayed correctly in the component.
5. What is the purpose of mocking API calls in unit tests?
Mocking API calls in unit tests helps make tests faster and more reliable because they don’t
depend on real servers. It avoids network delays or failures. Mocking also allows testing
different cases, like successful responses, errors, or empty data, to check if the component
works correctly in all situations.
6. Explain how you can test React components that interact with Redux stores.
Instead of using the real Redux store, we create a fake one with some test data.
Wrap the component with the Provider. This ensures the component gets the fake store’s
data, just like it would in a real app.
Then we render the component and see if it correctly displays data from the store.
If the component has buttons or inputs that trigger Redux actions, we simulate user
interactions and check if the state updates as expected.
Section 3: HTTP and WebSocket
1. What is HTTP as per the RFC ?
The Hypertext Transfer Protocol (HTTP) is an application-level protocol for
distributed, collaborative, hypermedia information systems. It is a generic, stateless,
protocol.
2. What is a Markup Language like HTML and XML?
Markup language is a way of structuring and formatting text using tags to define
elements. HTML is used to structure web pages. XML is used to store and transport
data. It defines custom tags for data representation.
3. What are WebSocket as per the RFC?
The WebSocket Protocol enables two-way communication between a client running
untrusted code in a controlled environment and a remote host that has opted-in to
communications from that code. The protocol consists of an opening handshake
followed by basic message framing, layered over TCP.
4. Explain the difference between HTTP and WebSocket. Why would you use WebSocket for
real-time communication?
HTTP is PULL format while WebSocket is PUSH format. When client needs data it
needs to send requests to server in case of HTTP. Server keeps sending data without
receiving request in case of WebSocket, that’s why we should use it for real-time
communication
5. What is CORS, and why is it important when working with HTTP APIs?
CORS (Cross-Origin Resource Sharing) is a security feature in web browsers that
controls which websites can access data from a server.
By default browsers block requests made from one website to another (different
origin) for security reasons. This prevents malicious websites from accessing your
private data from other sites.
CORS allows a server to specify which websites are allowed to access its data using
special headers in the response.
For example: If your frontend is running on https://myfrontend.com and tries to
fetch data from https://myapi.com, the API server must allow this request using
CORS headers. Access-Control-Allow-Origin: https://myfrontend.com
Section 4: Networking and OSI Model
1.Explain the OSI model and briefly describe the function of each of the seven layers.
OSI stands for Open System Interconnection. It describes how system communicate
with each other.
1. Physical layer: At this layer data is transferred in bits through communication
medium like fibre optic cables.
2. Data Link Layer: At this layer data is fragmented into frames. It is responsible for
the node-to-node delivery of data within the same local network. MAC address
is used to identify particular device
3. Network Layer: It is used for routing and addressing of data. Router works at this
layer at decides the optimal path. Assign the IP addresses to the network
4. Transport layer: At this layer there are two protocols: TCP and UDP
TCP (Transmission Control Protocol): It is connection-oriented protocol, reliable
UDP(Unified Datagram Protocol): It is Connection-less protocol, less reliable
5. Session Layer: It is used to establish and maintain the connection.
6. Presentation Layer: It is used to translate the data in particular format in which
receiver wants. Also encryption is also done at this layer.
7. Application Layer: At this layer there are various protocol ➔ HTTP, HTTPS, FTP,
DHCP, DNS, SMTP, POP
2.Describe how the TCP/IP protocol stack fits into the OSI model.
The TCP/IP model is a simplified version of the OSI (Open Systems Interconnection)
model used for networking. While the OSI model has 7 layers, the TCP/IP model has
4 layers, which map to the OSI layers as follows:
OSI TCP/IP
Application Application
Presentation
Session
Transport Transport
Network Internet Layer
Data Link Network Access Layer
Physical
3.What is an IP address, and how does it relate to network routing?
An IP (Internet Protocol) address is a unique numerical identifier assigned to each device
in a network. It helps in identifying devices and enabling communication over the
internet or a local network.
Routing is the process of forwarding data packets from a source to a destination using IP
addresses.
Source Device creates a packet with the destination IP address. Then router receives the
packet and checks its routing table to find the best path.
Then router sends the packet to the next hop until it reaches the destination. Destination
Device receives and processes the packet.
4.Describe the role of DNS in web browsing and how it interacts with the OSI model.
DNS (Domain Name System) acts like the internet’s phonebook. It translates human
readable domain names (like google.com) into IP addresses (like 142.250.190.46) which
allows browsers to find and load websites. It works at the Application Layer of the OSI
model.
1. You type google.com in a browser.
2. The browser asks a DNS server to find the IP address.
3. The DNS server returns the correct IP.
4. The browser connects to the website using this IP.
5.What is a subnet mask, and how is it used in IP addressing?
A subnet mask is a 32-bit number used in IP addressing to divide a network into smaller sub-
networks (subnets). Helps devices determine if another IP is in the same network or needs a
router. The first 3 octets (192.168.1) represent the network, and the last octet (10)
represents the host.
6.Explain the purpose of NAT (Network Address Translation) and where it is applied in networking.
NAT (Network Address Translation) is a method used in networking to map private IP
addresses to a public IP address for internet communication. It allows multiple devices in a
local network to share a single public IP address, helping conserve IPv4 addresses and
improve security. A home network has devices with private IPs like 192.168.1.10,
192.168.1.20, etc. The router translates these private IPs to a single public IP (203.0.113.5)
when accessing the internet. The response from the internet is then mapped back to the
correct device inside the network.
7.What is ARP (Address Resolution Protocol), and how does it work in networking?
ARP is network protocol used to find MAC address of a device only when its IP address is
known. Operated in Layer 2 of OSI model . A device wants to send data to another device in
the same network but only knows its IP address. It sends an ARP request. The target device
responds with its MAC address. The sender stores this MAC address in the ARP cache and
uses it to send data.
8.What is a MAC address and how does it differ from an IP address?
A MAC address is a unique hardware identifier assigned to a device’s network. It is given by
manufacturer. It is physical address and does not change.
While Ip address is a logical address assigned to a device when it connects to a network. It
can change depending on the network.
9.How would you troubleshoot a network issue using ping and traceroute?
ping is used to check if a device or server is reachable and measure response time. ping
google.com. traceroute helps identify where a connection is slow or failing by showing the
path packets take to reach a destination.
Section 5: Design Thinking
1. What is the Design Thinking process, and how does it help in solving complex problems?
Design Thinking is a user-centric, iterative approach to solving complex problems by
understanding user needs, redefining problems, and developing innovative solutions. It
promotes creativity, collaboration, and experimentation to achieve human-centered
solutions.
2. Describe the five stages of Design Thinking and give an example of how each stage can be
applied in product development.
Five Stages of Design Thinking:
Empathize – Understand user needs through research and observation.
Example: Observing restaurant customers to understand difficulties in ordering food.
Define – Clearly articulate the problem statement based on user insights.
Example: Customers find it difficult to customize their food orders, leading to dissatisfaction.
Ideate – Generate multiple creative solutions.
Example: Brainstorming ideas like an interactive menu with customization options or AI-
based recommendations.
Prototype – Build a low-fidelity version of the solution for quick testing.
Example: Creating a mockup of a mobile app that allows users to customize meals before
ordering.
Test – Gather user feedback and refine the solution.
Example: Letting customers use the prototype app and collecting feedback on ease of use
and order accuracy.
3. Explain how empathy is crucial in the Design Thinking process. Provide an example from your
own experience.
Empathy played a crucial role in our DMIT project by helping us understand the struggles
students and parents face when making career decisions. Many students feel confused
about their strengths, and parents often want to guide them but don’t know how. We
realized that traditional tests don’t always reflect a person’s true talents, making it difficult
for them to choose the right path. By listening to their concerns, we designed our DMIT
tool to provide personalized insights in a simple and supportive way.
4. How would you define a user persona, and why is it important in the Design Thinking process?
User Persona is a fictional representation of the target user based on research, including
demographics, behaviors, and goals. It helps teams design solutions that cater to specific
user needs. (Example: For a fitness tracking app, a persona could be “Ananya, a 28-year-old
working professional who wants to track her daily steps and calorie intake but has limited
time for workouts.)
5. What is the role of ideation in Design Thinking, and how do you generate multiple solutions?
Ideation encourages creative problem-solving by generating diverse ideas. Techniques
include brainstorming, mind mapping, and SCAMPER. Example: For a personal finance app,
ideating features like AI-based expense tracking, budget planning suggestions, and
integration with bank accounts to automate savings.
6. How do you prototype during the Design Thinking process? Give an example of a prototype that
could be used for testing a new feature.
Prototyping involves creating tangible models for user feedback. Example: A wireframe
prototype for an online food delivery app, allowing users to test the ordering process and
suggest improvements before full development.
7. What is the importance of testing in Design Thinking? How does it differ from traditional
product testing?
Testing in Design Thinking is iterative, focusing on user feedback to refine solutions. Unlike
traditional testing, it happens early and continuously. Example: Conducting usability testing
for a personal finance app by observing how users navigate the budgeting feature and
making improvements based on their difficulties.
Section 6: 80386
1.Explain the basic architecture of the Intel 80386 processor.
The Intel 80386 is a 32-bit microprocessor. Its architecture includes the following key
components:
32-bit Data Bus and Address Bus: The 80386 can address up to 4 GB of physical memory and
supports 32-bit data operations.
Registers: It has 32-bit general-purpose registers (EAX, EBX, ECX, EDX,etc) and segment
registers (CS, DS, SS, ES, FS, GS).
Segmentation and Paging: The processor supports memory segmentation and paging,
enabling virtual memory and memory protection.
Modes of Operation: It operates in three modes i.e. real mode , protected mode and virtual
8086 mode
2. What is the significance of the Task State Segment (TSS) in the 80386 processor?
The Task State Segment (TSS) is a special data structure used by the 80386 processor to
manage multitasking. The TSS is important for task switching because it allows the processor
to save the state of the current task and load the state of the next task automatically .It helps
in efficient and secure multitasking in operating systems
3. How does the 80386 handle segmentation and paging?
- Segmentation:
The 80386 divides memory into segments, each defined by a segment descriptor in the Global
Descriptor Table (GDT) or Local Descriptor Table (LDT).Each segment has a base address, limit,
and access rights. Logical addresses consist of a segment selector and an offset, which are
translated into linear addresses using the segment descriptor.
Paging
Paging is used to implement virtual memory. The linear address from segmentation is divided
into: page directory and page table. Each page is 4 KB in size, and the processor uses a two-
level page table structure to map linear addresses to physical addresses.
4. How is 80386 a better processor for building a modern operating system that supports task
switching?
The 80386 introduced several features that make it ideal for modern operating systems:
Protected mode , paging , task switching ,exception and interrupt handling and virtual 8086
Mode. These features collectively enable the development of multitasking, secure, and
efficient operating systems.
5. How does the 80386 handle exceptions and interrupts?
The 80386 uses an Interrupt Descriptor Table (IDT) to handle exceptions and interrupts. Key
steps include:
Interrupt Vector: Each interrupt or exception is assigned a unique vector number.
IDT Lookup: The processor uses the vector number to locate the corresponding entry in the
IDT.
Handler Execution: The IDT entry contains the address of the interrupt or exception handler,
which the processor executes.
Saving State: The processor saves the current state (e.g., instruction pointer, flags) before
transferring control to the handler.
Returning: After the handler completes, the processor restores the saved state and resumes
execution.
Section 7: Project Management and Agile
1. What is a Project?
A project is a temporary effort undertaken to create a unique product, service, or result. It has
specific goal, timeline and allocated resources
Example: Developing a new food delivery app.
2. What is a Service?
A service is an ongoing activity that continuously provides value without a fixed end date.
Example: Cloud storage service or customer support for a mobile app.
3. How are Project Management and Agile different?
Project management follows a structured, step-by-step approach like the Waterfall model,
where each phase is completed before moving to the next. Agile is an iterative and flexible
approach, focusing on continuous feedback, collaboration, and adaptability. Agile encourages
incremental development with frequent updates.
4. List down process groups and knowledge areas.
The five process groups in project management are initiating, planning, executing, monitoring
and controlling, and closing. The ten knowledge areas include integration, scope, schedule,
cost, quality, resource, communication, risk, procurement, and stakeholder management.
5. What knowledge areas have processes in each process group?
Each knowledge area has processes distributed across different process groups. For example,
risk management processes are mainly found in the planning and monitoring and controlling
stages. Scope, schedule, cost, and quality management processes are spread across planning,
executing, and monitoring and controlling. Integration and stakeholder management
processes appear in every process group.
6. What are different roles (tracks) in Agile Methodology?
Agile methodology includes several key roles. The product owner defines the product vision,
prioritizes the backlog, and represents stakeholders. The scrum master facilitates agile
processes, removes blockers, and ensures adherence to agile principles. The development
team is responsible for delivering the product increment. The agile coach guides teams in agile
adoption and best practices. Stakeholders provide feedback and define requirements.
7. What is the difference between Scrum and Kanban?
Scrum follows a sprint-based approach with time-boxed iterations, predefined roles, and
structured ceremonies like sprint planning, daily stand-ups, and retrospectives. Kanban is a
continuous workflow system that focuses on limiting work in progress and optimizing cycle
time. While scrum relies on fixed iterations, Kanban allows tasks to flow continuously without
strict time constraints.
8. Draw a Kanban board of an e-commerce application, showcasing a few items in each status.