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
- The 'thrashing' in an operating system is related to:
- Transaction T1 updates a row but has not yet committed. Transaction T2 reads this same row's uncommitted new value. T1 then rolls back, meaning T2 has read...
- What is a primary key in a relational database?
- In a relational schema, which normal form eliminates transitive dependencies (i.e., non-prime attribute depends on another non-prime attribute)?
- Which of the following illustrates an advantage of DBMS over traditional file systems?
- In DBMS, what is the term for a logical, virtual table based on the result of a stored SQL query?
- Which of the following is NOT a common type of error encountered during software development?
- What will re.findall(r'\d+', 'abc123def45ghi') return?
- What does the acronym ACID stand for in the context of database transaction management?
- A software defect that causes a program to produce incorrect output without crashing or displaying an error message is typically classified as a:
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)