Question
A person is walking at 4 m/sec in the same direction of
a train. The train crosses him in 5 seconds. If train speed is 72 km/hr, find the time it takes to cross a bridge of 100 metres.Solution
Train speed = 72 × (5/18) = 20 m/sec
Relative speed = 20 - 4 = 16 m/sec
L / 16 = 5 ⇒ L = 80 metres
Time to cross bridge = (80 + 100)/20 = 180/20 = 9 seconds
Consider the following C++ code:
  int a = 5;
  int b = 10;
  if (a > 0 && b < 10) {
    a = a + b;
...Which type of relationship does inheritance represent?
State True or False
Semi-structured data  is data that does not conform to a data model but has some structure. It lacks a fixed or rigid sc...
In a Selection Sort algorithm, the inner loop finds the index of the minimum element in the unsorted part. Which line correctly completes the if conditi...
Complete the Python code to check if a string email matches a simple email pattern (e.g., [email protected]).
import re
def is_valid_email(e...
Which of the following statements about a decoder is correct?
Which layer is not in OSI but in TCP/IP
Which CPU scheduling algorithm is best suited for time-sharing systems where each user needs a fair share of the CPU and response time is critical?
What is the relationship between encapsulation and abstraction?
You have a list of numbers and need to find the maximum value. Which of the following approaches would be the most efficient in terms of time complexity?