Exam Q&Ans

Exam Q&Ans Questions and answersπŸ“šπŸ“šπŸ“šπŸ“šπŸ“š

13/01/2026

πŸ™

                     Boost your Python interview preparation!Here are the most commonly asked Python questions with simp...
09/12/2025



Boost your Python interview preparation!
Here are the most commonly asked Python questions with simple answers.
Perfect for freshers & developers. Save for revision! πŸπŸ’»

βœ… PYTHON PROGRAMMING INTERVIEW Q&A (Short & Clear)

Q1: What is Python?

A: Python is a high-level, interpreted, object-oriented programming language known for readability and ease of use.

Q2: What are Python's key features?

A: Easy syntax, interpreted, dynamically typed, portable, extensive libraries.

Q3: What is PEP 8?

A: PEP 8 is Python’s coding style guide for writing clean and readable code.

Q4: What are lists and tuples?

A:

List β†’ Mutable

Tuple β†’ Immutable

Q5: What is a dictionary?

A: A collection of key–value pairs.

Q6: What is slicing in Python?

A: Extracting a portion of a sequence using [start:end:step].

Q7: What is a lambda function?

A: A small anonymous function written using the lambda keyword.

Q8: Explain *args and **kwargs.

A:

*args β†’ variable length positional arguments

**kwargs β†’ variable length keyword arguments

Q9: What is the difference between append() and extend()?

A:

append() β†’ adds one item

extend() β†’ adds multiple items

Q10: What is a virtual environment?

A: An isolated Python environment to manage project-specific packages.

Q11: What is indentation in Python?

A: Python uses indentation to define code blocks instead of braces {}.

Q12: What is the difference between == and is?

A:

== β†’ compares values

is β†’ compares memory identity

Q13: What is pickling?

A: Converting a Python object into a byte stream.

Q14: What is a module?

A: A Python file containing functions, classes, or variables.

Q15: What is an iterator?

A: An object that allows sequential access to elements using __iter__() and __next__().

Q1. What is C++?C++ is an object-oriented programming language that supports both procedural and OOP concepts.Q2. What i...
08/12/2025

Q1. What is C++?

C++ is an object-oriented programming language that supports both procedural and OOP concepts.

Q2. What is OOP?

Object-Oriented Programming organizes code using objects and classes.

Q3. What are the main OOP pillars?

Encapsulation, Inheritance, Polymorphism, Abstraction.

Q4. What is a class?

A class is a blueprint for objects.

Q5. What is an object?

An object is an instance of a class.

Q6. What is constructor?

A special method called automatically when an object is created.

Q7. What is destructor?

A method that is executed when an object is destroyed.

Q8. What is function overloading?

Same function name with different parameters.

Q9. What is operator overloading?

Using operators with user-defined meanings.

Q10. What is inheritance?

When one class derives features from another class.

Q11. Types of inheritance?

Single, Multiple, Multilevel, Hierarchical, Hybrid.

Q12. What is polymorphism?

One function behaving differently (overloading/overriding).

Q13. What is virtual function?

A function that can be overridden in derived classes.

Q14. What is pure virtual function?

A function declared but not defined β†’ used for abstraction.

Q15. What is an abstract class?

A class with at least one pure virtual function.

Q16. What is encapsulation?

Wrapping data and functions into a single unit (class).

Q17. What is a namespace?

Used to avoid naming conflicts.

Q18. What is STL?

Standard Template Library – includes vectors, lists, maps, queues, etc.

Q19. What is a vector?

A dynamic array that can grow or shrink.

Q20. What is pointer?

A variable that stores memory address.

Q21. What is reference variable?

An alias for another variable.

Q22. What is memory leak?

Losing access to allocated memory (not freed).

Q23. What is β€œthis” pointer?

Pointer that stores the address of the current object.

Q24. What is friend function?

A function that can access private members of a class.

Q25. What is exception handling?

Handling runtime errors using try–catch blocks

                                                            Node.js – Basic Interview Q&AQ1: What is Node.js?A: Node.js ...
28/11/2025



Node.js – Basic Interview Q&A

Q1: What is Node.js?

A: Node.js is a JavaScript runtime built on Chrome’s V8 engine that allows JavaScript to run on the server side.

Q2: What is NPM?

A: NPM (Node Package Manager) is a tool that manages libraries and packages in Node.js projects.

Q3: What is the Event Loop?

A: The event loop allows Node.js to handle asynchronous, non-blocking operations efficiently.

Q4: What are modules in Node.js?

A: Modules are reusable blocks of code.
Example: http, fs, path modules.

Q5: What is the difference between require() and import?

A:

require() β†’ CommonJS module system

import β†’ ES6 module system

                                                          React – Basic Interview Q&AQ1: What is React?A: React is a Jav...
28/11/2025



React – Basic Interview Q&A

Q1: What is React?

A: React is a JavaScript library used to build fast and interactive user interfaces, especially single-page applications.

Q2: What is a component in React?

A: A component is a reusable piece of UI that can be a function or class.
Example: Button, Header, Navbar.

Q3: What is JSX?

A: JSX stands for JavaScript XML.
It allows writing HTML inside JavaScript.

Q4: What is the Virtual DOM?

A: The Virtual DOM is a lightweight copy of the real DOM.
It updates only the changed parts, making React faster.

Q5: What is the difference between state and props?

A:

State: Internal data managed inside the component

Props: External data passed from parent to child component

                                                        PHP – Basic Interview Q&AQ1: What is PHP?A: PHP (Hypertext Prepr...
28/11/2025



PHP – Basic Interview Q&A

Q1: What is PHP?

A: PHP (Hypertext Preprocessor) is a server-side scripting language used to create dynamic and interactive web pages.

Q2: What is the difference between echo and print?

A:

echo β†’ Faster, no return value

print β†’ Slower, returns 1 (can be used in expressions)

Q3: What are GET and POST methods?

A:

GET β†’ Sends data via URL (visible, less secure)

POST β†’ Sends data in the request body (more secure)

Q4: What is a session in PHP?

A: A session stores user information (like login data) that can be used across multiple pages.

Q5: What is include and require?

A:

include β†’ Includes file; gives warning if file missing

require β†’ Includes file; stops ex*****on if file missing

                                                      SQL – Basic Interview Q&AQ1: What is SQL?A: SQL (Structured Query ...
28/11/2025



SQL – Basic Interview Q&A

Q1: What is SQL?

A: SQL (Structured Query Language) is used to store, retrieve, and manage data in a relational database.

Q2: What is the difference between DELETE, TRUNCATE, and DROP?

A:

DELETE β†’ Removes specific rows

TRUNCATE β†’ Removes all rows but keeps structure

DROP β†’ Deletes the entire table

Q3: What are primary key and foreign key?

A:

Primary Key: Unique identifier for each record

Foreign Key: Links two tables together using a related key

Q4: What is a JOIN?

A: JOIN combines rows from two or more tables based on a related column.

Q5: What is the difference between WHERE and HAVING?

A:

WHERE β†’ Filters rows before grouping

HAVING β†’ Filters rows after grouping (used with GROUP BY)

                                                    JavaScript – Basic Interview Q&AQ1: What is JavaScript?A: JavaScript...
28/11/2025



JavaScript – Basic Interview Q&A

Q1: What is JavaScript?

A: JavaScript is a scripting language used to make webpages interactive (animations, events, dynamic content).

Q2: What is the difference between var, let, and const?

A:

var β†’ Function-scoped, old way

let β†’ Block-scoped, modern

const β†’ Block-scoped, cannot be reassigned

Q3: What is DOM?

A: DOM (Document Object Model) represents the webpage structure that JavaScript can manipulate.

Q4: What is an array in JavaScript?

A: An array stores multiple values in a single variable.
Example: let fruits = ["apple", "banana", "mango"];

Q5: What is a function?

A: A function is a block of code designed to perform a task.
Example:

function greet() {
console.log("Hello!");
}

                                                  CSS – Basic Interview Q&AQ1: What is CSS?A: CSS (Cascading Style Sheet...
28/11/2025



CSS – Basic Interview Q&A

Q1: What is CSS?

A: CSS (Cascading Style Sheets) is used to style and design webpagesβ€”colors, fonts, layouts, spacing, animations.

Q2: What are the types of CSS?

A:

1. Inline CSS – inside the tag

2. Internal CSS – inside in the head

3. External CSS – in a separate .css file

Q3: What is the box model?

A: The CSS box model includes:
Content β†’ Padding β†’ Border β†’ Margin

Q4: What is the difference between class and id selectors?

A:
class β†’ Can be used multiple times

β†’ Must be unique on the page

Q5: What is Flexbox?

A: Flexbox is a layout module that makes it easy to align and distribute space in a container (row or column).

                                                HTML – Basic Interview Q&AQ1: What is HTML?A: HTML (HyperText Markup Lan...
27/11/2025



HTML – Basic Interview Q&A

Q1: What is HTML?

A: HTML (HyperText Markup Language) is the standard language used to create and structure webpages.

Q2: What is a tag in HTML?

A: A tag tells the browser how to display content.
Example: , ,

Q3: What is the difference between and ?

A:

β†’ Block-level element

β†’ Inline element

Q4: What is the purpose of tag?

A: It contains metadata, title, CSS links, scripts, and other browser instructions.

Q5: What is the tag used for?

A: is used to create hyperlinks.
Example: Click Here

                                              Kotlin – Basic Interview Q&AQ1: What is Kotlin?A: Kotlin is a modern, cros...
26/11/2025



Kotlin – Basic Interview Q&A

Q1: What is Kotlin?

A: Kotlin is a modern, cross-platform, statically typed programming language officially supported by Google for Android development.

Q2: What are the main features of Kotlin?

A: Null safety, concise syntax, extension functions, interoperability with Java, coroutines for asynchronous programming.

Q3: What is a nullable type in Kotlin?

A: A variable that can store null by using ?
Example: var name: String? = null

Q4: What are coroutines?

A: Coroutines allow writing asynchronous and non-blocking code in a simple way.
They help run tasks in the background without freezing the UI.

Q5: What is the difference between val and var?

A:

val β†’ Read-only (cannot be changed)

var β†’ Mutable (can be changed)

Address

Tarn Taran

Website

Alerts

Be the first to know and let us send you an email when Exam Q&Ans posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The School

Send a message to Exam Q&Ans:

Shortcuts

Share

Category