0% found this document useful (0 votes)
10 views19 pages

Tech Questions

Uploaded by

chowdarylahar
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)
10 views19 pages

Tech Questions

Uploaded by

chowdarylahar
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/ 19

java

Beginner-friendly:
1. What is the difference between JDK and JRE? [Beginner]

Answer: JDK stands for Java Development Kit, which includes tools for developing Java
applications. JRE stands for Java Runtime Environment, which is required to run Java applications.

2. How do you declare a variable in Java? [Beginner]

Answer: You can declare a variable in Java using the following syntax: `type variableName;` For
example, `int age;`

3. What is the difference between == and equals() method in Java? [Beginner]

Answer: The `==` operator compares the references of two objects, while the `equals()` method
compares the content or values of two objects.

4. What is the purpose of the main() method in Java? [Beginner]

Answer: The main() method is the entry point for a Java program and is where the program starts
its execution.

5. How do you print "Hello, World!" to the console in Java? [Beginner]

Answer: System.out.println("Hello, World!");

6. What is a constructor in Java? [Beginner]

Answer: A constructor is a special method used to initialize objects in Java. It has the same name as
the class and is called when an object is created.

7. What is method overloading in Java? [Beginner]

Answer: Method overloading is when a class has multiple methods with the same name but
different parameters.

8. What are access modifiers in Java? [Beginner]

Answer: Access modifiers determine the accessibility of classes, methods, and variables in Java.
Examples include public, private, and protected.
9. What is the difference between a class and an object in Java? [Beginner]

Answer: A class is a blueprint or template for creating objects, while an object is an instance of a
class.

10. What are the primitive data types in Java? [Beginner]

Answer: Java has eight primitive data types: byte, short, int, long, float, double, char, and boolean.

Moderate:
11. Explain the concept of inheritance in Java. [Moderate]

Answer: Inheritance is a mechanism in Java where a class acquires the properties and methods of
another class. It allows code reuse and creates a parent-child relationship between classes.

12. What is the difference between an abstract class and an interface in Java? [Moderate]

Answer: An abstract class can have both concrete and abstract methods, while an interface can
only have abstract methods. A class can implement multiple interfaces but can extend only one
abstract class.

13. How do you handle exceptions in Java? [Moderate]

Answer: Exceptions in Java can be handled using try-catch blocks. The try block contains the code
that may throw an exception, and the catch block catches and handles the exception.

14. What is method overriding in Java? [Moderate]

Answer: Method overriding is a feature in Java that allows a subclass to provide a different
implementation of a method that is already defined in its superclass.

15. What is the difference between checked and unchecked exceptions in Java? [Moderate]

Answer: Checked exceptions are checked at compile-time, and the programmer is required to
handle them using try-catch blocks or declaring them in the method signature. Unchecked
exceptions are not checked at compile-time and do not require explicit handling.

Advanced:
16. What are interfaces in Java? Provide an example. [Advanced]
Answer: An interface in Java is a collection of abstract methods. It defines a contract that
implementing classes must follow. Example: `interface Shape { void

draw(); }`

17. What are lambda expressions in Java? Provide an example. [Advanced]

Answer: Lambda expressions are anonymous functions introduced in Java 8. They allow you to
pass behavior as a parameter to methods. Example: `(x, y) -> x + y`

18. What is the Java Virtual Machine (JVM)? Explain its role. [Advanced]

Answer: JVM is an abstract machine that executes Java bytecode. It provides platform
independence by converting bytecode into machine-specific instructions.

19. What are the synchronized and volatile keywords used for in Java? [Advanced]

Answer: The synchronized keyword is used for thread synchronization, ensuring only one thread
can access a synchronized block of code at a time. The volatile keyword is used to ensure visibility of
changes made by one thread to other threads.

20. What is the purpose of the finalize() method in Java? [Advanced]

Answer: The finalize() method is called by the garbage collector before reclaiming the memory
occupied by an object. It allows an object to perform cleanup operations before it is garbage
collected.

Python
Beginner:
1.how is memory managed in python.
2.difference between float and double(memory storage)

3. How do you check the length of a string in Python?

4. What is the purpose of the if statement in Python?

5. How do you convert a string to an integer in Python?

6. How do you check if a value is present in a list in Python?

7. How do you check if a value is present in a list in Python?


8. What are the comparison operators in Python?

Moderate:
11. What are dictionaries in Python? Provide an example. [Moderate]
Answer: Dictionaries are unordered collections of key-value pairs. Example: `my_dict = {"name":
"John", "age": 30}`

12. How do you iterate over a list in Python? [Moderate]


Answer: You can use a `for` loop. For example, `for item in my_list:`

13. What is the difference between `append()` and `extend()` methods in Python? [Moderate]
Answer: The `append()` method adds an element to the end of a list, while the `extend()` method
extends a list by appending elements from another iterable.

14. What is the purpose of the `range()` function in Python? [Moderate]


Answer: The `range()` function generates a sequence of numbers. It is commonly used in loops.

15. How do you handle exceptions in Python? [Moderate]


Answer: Exceptions in Python can be handled using try-except blocks. The code that may raise an
exception is placed inside the try block, and the exception is caught and handled in the except block.

Advanced:
16. What are decorators in Python? Provide an example. [Advanced]
Answer: Decorators are a way to modify the behavior of functions or classes in Python. They are
indicated by the `@` symbol. Example: `@decorator_name`

17. What is the purpose of

a generator in Python? [Advanced]


Answer: A generator is a function that returns an iterator object. It allows you to iterate over a
sequence of values without storing them in memory.

18. What are the differences between shallow copy and deep copy in Python? [Advanced]
Answer: Shallow copy creates a new object but references the same elements, while deep copy
creates a new object and recursively copies all the elements.

19. What are context managers in Python? Provide an example. [Advanced]


Answer: Context managers in Python are used to allocate and release resources automatically. They
are commonly used with the `with` statement. Example: `with open("file.txt", "r") as file:`

20. How do you handle multithreading in Python? [Advanced]


Answer: Multithreading in Python can be achieved using the `threading` module. It allows you to
run multiple threads concurrently.

Beginner-friendly:
1. What is the difference between `printf()` and `scanf()` functions in C? [Beginner]
Answer: `printf()` is used to display output to the console, while `scanf()` is used to read input from
the user.

2. How do you declare a variable in C? [Beginner]


Answer: Variables in C are declared with a data type followed by the variable name. For example,
`int age;`

3. What is the purpose of the `if` statement in C? [Beginner]


Answer: The `if` statement is used for conditional execution of code. It allows you to check if a
certain condition is true and execute specific code accordingly.

4. How do you calculate the length of a string in C? [Beginner]


Answer: You can use the `strlen()` function from the `<string.h>` library. For example, `int length =
strlen(str);`

5. What is the `sizeof` operator in C used for? [Beginner]


Answer: The `sizeof` operator is used to determine the size of a data type or variable in bytes.

6. How do you define a constant in C? [Beginner]


Answer: Constants in C are defined using the `const` keyword. For example, `const int
MAX_VALUE = 100;`

7. What is the purpose of the `while` loop in C? [Beginner]


Answer: The `while` loop is used to repeatedly execute a block of code as long as a certain
condition is true.

8. How do you swap the values of two variables in C without using a temporary variable? [Beginner]
Answer:
```
a = a + b;
b = a - b;
a = a - b;
```

9. What is the difference between `++i` and `i++` in C? [Beginner]


Answer: `++i` is the pre-increment operator, which increments the value of `i` before its usage.
`i++` is the post-increment operator, which increments the value of `i` after its usage.

10. What is the purpose of the `return` statement in C? [Beginner]


Answer: The `return` statement is used to exit a function and return a value back to the caller.

Moderate:
11. What is the difference between an array and a pointer in C? [Moderate]
Answer: An array is a fixed-size collection of elements, while a pointer is a variable that stores the
memory address of another variable.

12. How do you dynamically allocate memory in C? [Moderate]


Answer: Memory can be dynamically allocated in C using the `malloc()` function. For example,
`int* ptr = (int*)malloc(sizeof(int));`

13. What is the purpose of the `switch` statement in C? [Moderate]


Answer: The `switch` statement is used to perform different actions based on different values of a
variable or expression.
14. How do you find the factorial of a number in C? [Moderate]
Answer:
```
int factorial = 1;
for (int i = 1; i <= n; i++) {
factorial *= i;
}
```

15. What is the difference between pass-by-value and pass-by-reference in C? [Moderate]


Answer: Pass-by-value makes a copy of the value being passed to a function, while pass-by-
reference allows the function to modify the original value.

Advanced:
16. What

are function pointers in C? Provide an example. [Advanced]


Answer: Function pointers in C are variables that store the address of functions. Example: `int
(*sum)(int, int) = &add;`

17. What are the storage classes in C? Explain their differences. [Advanced]
Answer: The storage classes in C are `auto`, `static`, `register`, and `extern`. They differ in their
lifetime, scope, and memory allocation.

18. What is recursion in C? Provide an example. [Advanced]


Answer: Recursion is a programming technique where a function calls itself. Example:
```
int factorial(int n) {
if (n == 0 || n == 1) {
return 1;
} else {
return n * factorial(n - 1);
}
}
```

19. What are function prototypes in C? [Advanced]


Answer: Function prototypes in C are forward declarations of functions that specify the function's
name, return type, and parameter types.

20. How do you implement a linked list in C? [Advanced]


Answer: A linked list in C can be implemented using structures and pointers to create a chain of
nodes, where each node contains data and a pointer to the next node.

C++

Beginner-friendly:
1. What is the difference between C and C++? [Beginner]
Answer: C++ is an extension of C with additional features such as classes, objects, and inheritance.

2. How do you declare and initialize a variable in C++? [Beginner]


Answer: Variables in C++ are declared with a data type followed by the variable name, and they can
be initialized with an initial value. For example, `int age = 20;`

3. What is the purpose of the `cout` object in C++? [Beginner]


Answer: `cout` is used for standard output in C++. It is part of the `iostream` library and is used to
display text and variables on the console.

4. What is the difference between `new` and `malloc()` in C++? [Beginner]


Answer: `new` is used to dynamically allocate memory for an object in C++, while `malloc()` is
used in C to allocate memory for a block of bytes.

5. How do you define a function in C++? [Beginner]


Answer: Functions in C++ are defined with a return type, function name, parameters, and a function
body. For example, `int sum(int a, int b) { return a + b; }`

6. What is the purpose of the `if` statement in C++? [Beginner]


Answer: The `if` statement is used for conditional execution of code. It allows you to check if a
certain condition is true and execute specific code accordingly.

7. How do you calculate the length of a string in C++? [Beginner]


Answer: You can use the `length()` or `size()` member functions of the `std::string` class. For
example, `int length = str.length();`

8. What is the purpose of the `while` loop in C++? [Beginner]


Answer: The `while` loop is used to repeatedly execute a block of code as long as a certain
condition is true.

9. How do you pass arguments to a function by reference in C++? [Beginner]


Answer: To pass arguments by reference in C++, you need to use the `&` operator in both the
function declaration and the function call.

10. What is the purpose of the `return` statement in C++? [Beginner]


Answer: The `return` statement is used to exit a function and return a value back to the caller.

Moderate:
11. What is the difference between a class and an object in C++? [Moderate]
Answer: A class is a blueprint or template for creating objects, while an object is an instance of a
class.

12. How do you handle exceptions in C++? [Moderate]


Answer: Exceptions in C++ can be handled using try-catch blocks. The code that may throw an
exception is placed inside the try block, and the exception is caught and handled in the catch block.

13. What is function overloading in C++? Provide an example. [Moderate]


Answer: Function overloading in C++ allows you to have multiple functions with the same name
but different parameter lists. Example:
```
int sum(int a, int b);
float sum(float a, float b);
```

14. What are constructors and destructors in C++? [Moderate]


Answer: Constructors are special member functions that are called when an object is created, while
destructors are called when an object is destroyed or goes out of scope.

15. What

is the difference between a pointer and a reference in C++? [Moderate]


Answer: A pointer is a variable that stores the memory address of another variable, while a
reference is an alias or an alternative name for an existing variable.

Advanced:
16. What are templates in C++? Provide an example. [Advanced]
Answer: Templates in C++ allow you to create generic types or functions that can work with
different data types. Example:
```
template <typename T>
T max(T a, T b) {
return (a > b) ? a : b;
}
```

17. What are virtual functions in C++? [Advanced]


Answer: Virtual functions are member functions in C++ that are declared in a base class and can be
overridden by derived classes. They enable polymorphism and dynamic binding.

18. What is multiple inheritance in C++? [Advanced]


Answer: Multiple inheritance in C++ allows a class to inherit from more than one base class. It
enables a class to inherit features and behaviors from multiple parent classes.
19. What are smart pointers in C++? [Advanced]
Answer: Smart pointers in C++ are objects that manage the lifetime of dynamically allocated
objects. They automatically release the memory when it is no longer needed, thus avoiding memory
leaks.

20. What is the difference between function overloading and function overriding in C++? [Advanced]
Answer: Function overloading allows multiple functions with the same name but different
parameters in the same scope, while function overriding occurs when a derived class provides a
different implementation of a virtual function inherited from a base class.

Front end :
Beginner-friendly:
1. What is HTML? [Beginner]
Answer: HTML stands for HyperText Markup Language. It is the standard markup language used
for creating web pages.

2. What is CSS? [Beginner]


Answer: CSS stands for Cascading Style Sheets. It is a styling language used to describe the
appearance and formatting of a document written in HTML.

3. What is the purpose of the `<div>` element in HTML? [Beginner]


Answer: The `<div>` element is a container that is used to group other HTML elements together
and apply styling or manipulate them with CSS or JavaScript.

4. How do you create a hyperlink in HTML? [Beginner]


Answer: You can create a hyperlink in HTML using the `<a>` (anchor) element. For example, `<a
href="https://example.com">Click here</a>`.

5. What is the CSS box model? [Beginner]


Answer: The CSS box model is a design concept that represents the content, padding, border, and
margin of an element as a rectangular box.

6. What is the difference between inline and block elements in HTML? [Beginner]
Answer: Inline elements do not start on a new line and only take up as much width as necessary,
while block elements start on a new line and take up the full width available.
7. What is the purpose of the `class` attribute in HTML? [Beginner]
Answer: The `class` attribute is used to assign one or more CSS classes to an HTML element. It
allows you to apply specific styles to multiple elements.

8. How do you change the background color of an element in CSS? [Beginner]


Answer: You can change the background color of an element in CSS using the `background-color`
property. For example, `background-color: #ff0000;`

9. What is the purpose of the `<img>` element in HTML? [Beginner]


Answer: The `<img>` element is used to insert an image into an HTML document. It requires the
`src` attribute to specify the image source.

10. How do you center align text in CSS? [Beginner]


Answer: You can center align text horizontally using the `text-align` property and vertically using
techniques such as flexbox or CSS grid.

Moderate:
11. What is the purpose of media queries in CSS? [Moderate]
Answer: Media queries in CSS allow you to apply different styles based on the characteristics of
the device or browser, such as screen size or orientation.

12. How do you create a responsive web design? [Moderate]


Answer: Responsive web design involves using techniques such as fluid grids, flexible images, and
media queries to create a website that adapts to different screen sizes and devices.

13. What is the difference between `display: block`, `display: inline`, and `display: inline-block` in
CSS? [Moderate]
Answer: `display: block` makes an element a block-level element, `display: inline` makes an
element an inline-level element, and `display: inline-block` makes an element an inline-level element
that respects margins and paddings.

14. What are pseudo-classes in CSS? Provide an example. [Moderate]


Answer: Pseudo-classes in CSS are keywords that specify a special state of an element. Example:
`:hover` is a pseudo-class that applies styles when the element is being hovered over.
15. How do you implement a dropdown menu in HTML and CSS? [Moderate]
Answer: A dropdown menu can be

implemented using HTML `<ul>` and `<li>` elements for the menu structure and CSS to control the
visibility and positioning of the menu.

Advanced:
16. What are CSS preprocessors? Provide an example. [Advanced]
Answer: CSS preprocessors like Sass or Less are tools that extend the capabilities of CSS by
introducing features such as variables, nesting, mixins, and functions. Example: Sass code using
variables: `$primary-color: #ff0000;`.

17. What is the purpose of flexbox in CSS? [Advanced]


Answer: Flexbox is a layout model in CSS that provides a more efficient way to arrange and align
elements within a container. It allows for flexible and responsive layouts.

18. What are CSS frameworks? Provide an example. [Advanced]


Answer: CSS frameworks like Bootstrap or Foundation are pre-written CSS code libraries that
provide a grid system, reusable components, and pre-defined styles to speed up web development.

19. How do you optimize the performance of a web page? [Advanced]


Answer: Performance optimization techniques include minimizing file sizes, compressing images,
reducing HTTP requests, using caching, and optimizing JavaScript and CSS code.

20. What are CSS animations and transitions? Provide an example. [Advanced]
Answer: CSS animations and transitions allow you to animate and add smooth transitions to HTML
elements without using JavaScript. Example: Transition on hover: `transition: background-color 0.5s
ease;`.
Android studio

Beginner-friendly:
1. What is Android Studio? [Beginner]
Answer: Android Studio is the official integrated development environment (IDE) for Android app
development. It provides tools and features for designing, coding, and testing Android applications.

2. What is an Activity in Android? [Beginner]


Answer: An Activity is a core component in an Android app that represents a single screen with a
user interface. It is responsible for handling user interactions and displaying UI elements.

3. How do you create a new project in Android Studio? [Beginner]


Answer: To create a new project in Android Studio, go to File -> New -> New Project. Follow the
prompts to specify project details, such as the app name, package name, and target SDK version.

4. What is an XML layout file in Android? [Beginner]


Answer: An XML layout file in Android defines the structure and appearance of the user interface
components for an Activity or a fragment.

5. How do you handle button clicks in Android? [Beginner]


Answer: You can handle button clicks in Android by setting an `OnClickListener` on the button and
implementing the `onClick` method to perform the desired action.

6. What is the purpose of the AndroidManifest.xml file? [Beginner]


Answer: The AndroidManifest.xml file contains essential information about an Android app, such
as the app's package name, permissions, activities, services, and broadcast receivers.

7. How do you display a Toast message in Android? [Beginner]


Answer: You can display a Toast message in Android using the `Toast.makeText()` method,
specifying the context, message, and duration.

8. What is the difference between `match_parent` and `wrap_content` in Android layouts? [Beginner]
Answer: `match_parent` (or `fill_parent`) tells the view to take up as much space as its parent
allows, while `wrap_content` tells the view to wrap its content tightly.
9. What is the purpose of the `findViewById()` method in Android? [Beginner]
Answer: The `findViewById()` method is used to find and retrieve a reference to a UI element in an
Activity or a fragment based on its resource ID.

10. How do you navigate between activities in Android? [Beginner]


Answer: You can navigate between activities in Android by using the `Intent` class to create an
intent and calling `startActivity()` or `startActivityForResult()`.

Moderate:
11. What is the Android Support Library? [Moderate]
Answer: The Android Support Library is a set of libraries provided by Google that allows
developers to use newer features and APIs on older versions of Android.

12. How do you save data in Android? [Moderate]


Answer: You can save data in Android using various techniques, such as shared preferences, files,
databases (SQLite), or using cloud-based storage solutions.

13. What are Fragments in Android? [Moderate]


Answer: Fragments are modular UI components in Android that represent a portion of an Activity's
user interface. They allow for reusability and flexible UI designs.

14. What is the purpose of AsyncTask in Android? [Moderate]


Answer: AsyncTask is a class in Android that allows you to perform background operations and
update the UI thread. It is commonly used for tasks such as network operations.

15. How do you handle screen orientation changes in Android? [Moderate]


Answer: You can handle screen orientation changes in Android by using configuration changes,
saving/restoring instance state, or using the ViewModel architecture component.

Advanced:
16. What is the Android
Jetpack library? [Advanced]
Answer: Android Jetpack is a set of libraries, tools, and architectural guidance provided by Google
that helps developers build robust and maintainable Android apps.

17. Explain the concept of LiveData in Android. [Advanced]


Answer: LiveData is an observable data holder class in Android Jetpack that allows you to observe
changes to data and automatically update the UI. It is lifecycle-aware.

18. What is dependency injection in Android? [Advanced]


Answer: Dependency injection is a design pattern in Android that allows you to provide
dependencies to classes instead of creating them within the class itself. It improves testability and
modularity.

19. How do you perform network operations in Android? [Advanced]


Answer: Network operations in Android can be performed using classes like
`HttpURLConnection`, `Volley`, or `Retrofit` to make HTTP requests and handle responses.

20. What is ProGuard in Android? [Advanced]


Answer: ProGuard is a tool in Android that performs code shrinking, obfuscation, and optimization.
It helps reduce the size of the APK and secure the code against reverse engineering.

Framework:
Beginner-friendly:
1. What is a framework in software development? [Beginner]
Answer: A framework is a pre-written codebase that provides a structure and set of tools to simplify
and accelerate the development of software applications.

2. What is the difference between a library and a framework? [Beginner]


Answer: A library is a collection of reusable code that can be called by an application, whereas a
framework provides a complete structure and set of tools for building an application.

3. What is the purpose of Bootstrap? [Beginner]


Answer: Bootstrap is a popular front-end framework that provides a collection of CSS and
JavaScript components and utilities for building responsive and visually appealing web pages.
4. How do you include a CSS framework in your HTML document? [Beginner]
Answer: To include a CSS framework, you typically link to the framework's CSS file in the
`<head>` section of your HTML document using the `<link>` tag.

5. What is the purpose of the Model-View-Controller (MVC) framework? [Beginner]


Answer: The MVC framework is a software design pattern that separates an application into three
interconnected components: the model (data), the view (user interface), and the controller (logic).

6. What is the purpose of React in web development? [Beginner]


Answer: React is a JavaScript library for building user interfaces. It allows developers to create
reusable UI components and efficiently update the UI based on changes in data.

7. How do you install a framework using a package manager like npm or Composer? [Beginner]
Answer: To install a framework using a package manager, you typically run a command like `npm
install framework-name` or `composer require framework-name` in the terminal or command prompt.

8. What is the purpose of Laravel in PHP development? [Beginner]


Answer: Laravel is a PHP framework that provides a clean and elegant syntax, along with a wide
range of features, to simplify the development of web applications.

9. What is the purpose of Angular in web development? [Beginner]


Answer: Angular is a TypeScript-based framework for building dynamic and scalable web
applications. It provides a complete toolset for building UI components, managing data, and handling
routing.

10. How do you create a new project in a specific framework? [Beginner]


Answer: The process for creating a new project in a specific framework may vary. Generally, you
need to follow the framework's documentation and use a command or tool to scaffold a new project.

Moderate:
11. What is the concept of middleware in Express.js? [Moderate]
Answer: Middleware in Express.js is a function that sits between the server and the route handler. It
can modify the request and response objects, perform additional processing, and pass control to the
next middleware or route handler.
12. How do you handle authentication and authorization in a web application built with a framework
like Django or Ruby on Rails? [Moderate]
Answer: Authentication and authorization in frameworks like Django or Ruby on Rails can be
handled by using built-in features such as authentication middleware, user management systems, and
role-based access control.

13. What is the purpose of Spring Boot in Java development? [Moderate]


Answer: Spring Boot is a framework that simplifies the development of Java applications by
providing auto-configuration, embedded servers, and a wide range of libraries and tools.

14. What is the concept of data binding in Angular? [Moderate]


Answer: Data binding in Angular allows you to establish a connection between the UI elements and
the underlying data model. It enables automatic synchronization and updates between

the two.

15. How do you handle form validation in a framework like Laravel or ASP.NET MVC? [Moderate]
Answer: Form validation in frameworks like Laravel or ASP.NET MVC can be handled by using
validation libraries or built-in form validation features that validate input data based on specified
rules.

Advanced:
16. What is the concept of dependency injection in a framework like Symfony or Spring? [Advanced]
Answer: Dependency injection is a design pattern where the dependencies of a class are provided
from the outside rather than being created within the class itself. It promotes loose coupling and easier
testing.

17. How do you implement server-side rendering in a framework like Next.js or Nuxt.js? [Advanced]
Answer: Server-side rendering in frameworks like Next.js or Nuxt.js allows rendering the initial
HTML on the server before sending it to the client, providing better performance and SEO benefits.

18. What is the purpose of Vuex in Vue.js development? [Advanced]


Answer: Vuex is a state management pattern and library for Vue.js applications. It provides a
centralized store for managing the application's state, making it easier to share and update data across
components.
19. How do you handle database migrations in a framework like Rails or Django? [Advanced]
Answer: Database migrations in frameworks like Rails or Django allow you to manage changes to
the database schema over time. Migrations provide a way to create, modify, and rollback database
schema changes.

20. What is the purpose of GraphQL in modern web development with frameworks like Apollo or
Relay? [Advanced]
Answer: GraphQL is a query language for APIs that provides a more efficient and flexible
alternative to REST. It allows clients to request specific data and reduces over-fetching and under-
fetching of data.

Please note that the answers provided are brief explanations. You can expand on them or provide
more details during the interview as necessary.

You might also like