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
- You have a Python list of fruits and want to extract a specific sub-list using slicing. Complete the missing part of the code to obtain the sub-list `['b...
- A relation is in 2NF if:
- What is a table joined with itself called?
- What is context switching?
- Given a relation R(A, B, C, D, E) and functional dependencies {A -> B, BC -> D, D -> E}. Which of the following is a candidate key for R?
- Which of the following is a property of a relational database?
- An RDBMS provides mechanisms for data integrity, such as primary keys and foreign keys, which are generally lacking in:
- In indexing, which tree is most commonly used for disk-based indexing because it minimizes disk seeks and keeps nodes dense?
- In relational algebra, the operation that combines tuples from two relations using common attribute values is:
- Distributed 2-Phase Commit (2PC) can suffer from:
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)