INFORMATION TECHNOLOGY (IT)
Information Technology (IT)
چار آپشن میں سے کسی ایک پر کلک کرنے سے جواب سرخ ہو جائے گا۔
- z-index
- position
- display
- float
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
z-index controls the stacking order of overlapping elements in CSS.
Elements with a higher z-index appear in front of elements with a lower z-index.
It only works on elements with a position value other than static (e.g., relative, absolute, fixed).
position sets how an element is positioned on the page but doesn’t control layering.
display and float affect layout and flow, not stacking order
- Border-radius
- Border-style
- Border-width
- Border-color
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
The border-radius property in CSS creates rounded corners on elements.
You can specify a single value for uniform rounding or multiple values for different corners.
border-style defines the line style (solid, dashed, etc.).
border-width sets the thickness of the border.
border-color sets the color of the border.
- Can have both red or black root node
- Has red root node
- Has black root node
- Root color does not matter
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
A Red-Black Tree is a self-balancing binary search tree.
One of its properties is that the root node is always black.
Other properties include:
-
Red nodes cannot have red children (no two reds in a row).
-
Every path from a node to its leaves has the same number of black nodes.
- Reduces CPU usage by checking only one device
- Ensures system always reads maximum available data efficiently
- Avoids memory leaks
- Minimizes network traffic
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Max polling is commonly used in I/O operations and real-time systems.
It is a technique where the system reads all available data from a device or buffer in one go.
It reduces the number of polling cycles needed, improving efficiency.
- Match between system and real world
- User control and freedom
- Consistency and standards
- Aesthetic and minimalist design
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
User control and freedom allows users to undo or redo actions.
It helps users recover from mistakes without severe consequences.
- Easier to implement
- Violates interface segregation principle
- Improves performance
- No effect
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
The Interface Segregation Principle (ISP) states that clients should not be forced to depend on methods they do not use.
If an interface has too many unrelated methods, it becomes difficult to implement and maintain.
Clients may be forced to implement methods that are irrelevant to them.
- Ignores negative edges
- Finds shortest paths even with negative edges
- Converts negative edges to zero
- Throws an error
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
The Floyd–Warshall algorithm computes shortest paths between all pairs of vertices.
It supports negative edge weights, as long as there are no negative cycles.
Negative cycles make the shortest path undefined, which Floyd–Warshall can detect.
- Optimization
- Reduce memory loss
- Code reusability (generic programming)
- Memory allocation
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Templates in C++ allow writing generic functions or classes.
They enable the same code to work with different data types without rewriting it.
This improves code reusability and maintainability.
Templates are not directly about memory optimization or allocation.
Example: template <typename T> T add(T a, T b) works for int, float, or double.
- HTML
- CSS
- Python
- JavaScript
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Server-side rendering (SSR) generates HTML on the server before sending it to the client.
Python (with frameworks like Django or Flask) can render templates on the server.
JavaScript can also do SSR (e.g., with Node.js), but in this option, Python is the server-side language.
HTML and CSS are used for structure and styling, not server-side logic.
SSR improves initial page load speed and SEO.
- To store variables
- To group identifiers and avoid name conflicts
- To create new functions
- To allocate memory
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
- A namespace in C++ is used to organize code into logical groups.
- It helps avoid name conflicts when different parts of code use the same names.
- For example, two libraries can have functions with the same name but in different namespaces.
- The std namespace (e.g., std::cout) is a common example.
- Namespaces improve code clarity and maintainability.