Question
Consider the following pseudo-code: ``` function calculate(arr): sum = 0 for i from 0 to length(arr) - 1: if arr[i] % 2 == 0: sum = sum + arr[i] else: sum = sum - arr[i] return sum my_array = [1, 2, 3, 4, 5] result = calculate(my_array) print(result) ``` What will be the output of this code?
More IT DBMS Questions
- When implementing a `Graph` traversal algorithm like Depth-First Search (DFS) recursively, what is the primary control flow mechanism that manages the orde...
- Which type of relationship exists when a record in one table can relate to multiple records in another table, and vice versa?
- The 'thrashing' in an operating system is related to:
- Transaction T1 reads a row twice within the same transaction. Between the two reads, T2 commits an update to that row, and T1's second read returns the new...
- Which of the following is true about ACID properties in DBMS?
- What is a 'transaction' in DBMS and what does 'COMMIT' do?
- A transaction T1 updates a row and then waits for a lock held by T2. T2 is waiting for a lock held by T1. What condition has occurred?
- In indexing, which tree is most commonly used for disk-based indexing because it minimizes disk seeks and keeps nodes dense?
- Which SQL clause is used to filter rows based on a specified condition *after* grouping has been performed?
- In paging, the page size is defined by:
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)