Question
A triangular plot of land has sides 15 m, 20 m, and 25
m. Find its area and the cost of fencing it along all sides at Rs 80 per metreSolution
Check right angle: 15² + 20² = 225 + 400 = 625 = 25². So it is a right-angled triangle with perpendicular sides 15 m and 20 m. Area = (1/2) × base × height = (1/2) × 15 × 20 = 150 m² Perimeter = 15 + 20 + 25 = 60 m Cost of fencing = 60 × 80 = Rs 4800 Answer: Area = 150 m²; Fencing cost = Rs 4800.
Which of the following is the primary reason why polymorphism is useful in Object-Oriented Programming (OOP)?
What is the primary purpose of an abstract class?
What is the space complexity of storing an adjacency matrix for a graph with V vertices and E edges?
What is the time complexity of inserting an element at the beginning of a singly linked list?
Which of the following is NOT a type of graph representation?
In a data analysis scenario involving a fixed-size dataset where elements need to be accessed frequently by their position, which data structure is gene...
In C++, which access specifier makes members accessible only from within the class itself and from friend functions/classes?
Deletion in Red-Black Tree may require:
Which data structure uses FIFO (First In, First Out)?
Which traversal method visits the root node first in trees?