Q1easy
What does the term "Dry Running" code mean?
Topic-wise practice questions for Problem Solving & Analytical Skills. Test your knowledge, check solutions on demand, and pace your preparation.
function swap(a, b):
a = b
b = a
x = 5, y = 10
swap(x, y)
print(x, y)
sum = 0
for i from 1 to N:
sum = sum + arr[i]
avg = sum / N
Assuming 0-based indexing, what common error is present here?
for i from 0 to arr.length - 1:
if arr[i] == target:
return i
return -1
if (index < 0 AND index > arr.length):
print("Invalid Index")