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
- A relation R(A, B, C, D) has functional dependencies A -> B, A -> C, and C -> D, with A as the only candidate key. What is the highest normal form satisfie...
- T1 updates a row but has not committed; T2 reads that updated value; T1 then rolls back. What anomaly did T2 experience?
- Which normal form ensures a table has no transitive dependency between its non-key attributes?
- Which normal form removes partial dependency?
- Which of the following is a property of a relational database?
- In DBMS, which scheduling method ensures serializability of transactions?
- A table contains 1,000,000 records, and a B+ tree index built on it has a fan-out (branching order) of exactly 100 at each internal node. What is the appro...
- Which transaction isolation level permits non-repeatable reads and phantom reads while still guaranteeing that dirty reads never occur?
- In a 'clustered' index on a database table, what distinguishes it from a non-clustered index?
- What is referential integrity?
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)