All Practice Exams

Free Practice Questions for Israel Bagrut Computer Science 5 Units

Exam-style questions and explanations by OpenExamPrep.

✓ No registration✓ No credit card
Exam pass rate: ~80-85%
100+ Questions
100% Free

Loading practice questions...

Exam Review

Key Facts: Israel Bagrut Computer Science 5 Units Exam

5 Units

Highest matriculation study level in secondary computing

Israel Ministry of Education

Sheelon 899371

Official national theoretical examination code

Ministry of Education Testing Department

3 Hours

Duration of the national written matriculation session

Bagrut Examination Schedule

55 / 100

Minimum passing grade in the Israeli Bagrut system

Ministry of Education Regulations

Java / C#

Official programming languages utilized in curricula

Pedagogical Secretariat Computer Science Inspectorate

100 MCQs

Full practice questions in this OpenExamPrep bank

OpenExamPrep Practice Catalog

The Israel Bagrut Computer Science 5 Units exam is a prestigious national matriculation credential in computing, covering algorithms, OOP, dynamic data structures, Big-O complexity, and automata theory. This practice bank provides 100 high-yield questions with in-depth solutions.

Sample Israel Bagrut Computer Science 5 Units Practice Questions

Try these sample questions to review concepts for the Israel Bagrut Computer Science 5 Units exam. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1In Java / C#, consider the following variable declarations: int a = 19; int b = 4; int result = a / b + a % b; What is the value of `result`?
A.7
B.8
C.4.75
D.3
Explanation: Integer division `19 / 4` truncates the decimal part and evaluates to `4`. The modulo operator `19 % 4` computes the remainder, which is `3`. Therefore, `result = 4 + 3 = 7`.
2Consider the following boolean condition in Java / C# where `arr` is an integer array: if (arr != null && arr.length > 0 && arr[0] == 10) Why does this condition not throw a `NullPointerException` when `arr` is null?
A.Because the compiler rearranges the sub-expressions at compile time to optimize execution.
B.Because the logical AND operator (&&) performs short-circuit evaluation, terminating immediately once the first operand evaluates to false.
C.Because null arrays in Java and C# automatically return a length of 0.
D.Because runtime exception handling silently suppresses null references inside conditional statements.
Explanation: The `&&` operator evaluates from left to right and uses short-circuit evaluation. If `arr != null` evaluates to `false`, the remaining expressions (`arr.length > 0` and `arr[0] == 10`) are never evaluated, safely preventing a `NullPointerException`.
3How many times will the print statement execute in the following loop? for (int i = 1; i <= 32; i *= 2) { System.out.println(i); }
A.5 times
B.6 times
C.32 times
D.16 times
Explanation: The variable `i` takes successive values corresponding to powers of 2: 1, 2, 4, 8, 16, and 32. All six values satisfy `i <= 32`. When `i` is doubled to 64, the loop condition evaluates to false. Thus, the body executes exactly 6 times.
4An array of integers `int[] numbers = new int[10];` is created. Which statement correctly identifies the valid index range and default initial value of its elements in Java / C#?
A.Indices 1 to 10 with default value 0
B.Indices 0 to 9 with default value 0
C.Indices 0 to 10 with default value null
D.Indices 0 to 9 with default value -1
Explanation: In Java and C#, array indices are zero-based, spanning from 0 to `length - 1` (0 to 9 for length 10). Numeric primitive arrays are automatically initialized to 0.
5Consider the following method and call: public static void modify(int num, int[] arr) { num += 10; arr[0] += 10; } int x = 5; int[] a = { 5 }; modify(x, a); What are the values of `x` and `a[0]` after the method call completes?
A.x = 5, a[0] = 5
B.x = 15, a[0] = 15
C.x = 5, a[0] = 15
D.x = 15, a[0] = 5
Explanation: Java and C# pass primitive variables like `int` by value, meaning `modify` operates on a copy of `x`; the original `x` remains 5. Arrays are reference types; the method receives a copy of the reference pointing to the same memory location, so mutating `arr[0]` directly alters the contents of `a[0]` to 15.
6What is the output of the following code snippet in Java? String s = "Bagrut"; s.concat(" 2026"); System.out.println(s);
A."Bagrut 2026"
B."Bagrut"
C."2026"
D.Compilation error because concat requires an explicit cast
Explanation: `String` objects in Java and C# are immutable. The `concat` method creates and returns a new `String` object containing "Bagrut 2026", but because this return value is not assigned back to `s`, `s` continues to reference the original unchanged string "Bagrut".
7Consider the following method intended to sum all positive values in an array: public static int sumPositives(int[] arr) { int sum = 0; for (int i = 0; i < arr.length; i++) { if (arr[i] > 0) { sum += arr[i]; } } return sum; } What does `sumPositives(new int[]{ -3, 4, 0, -1, 6 })` return?
A.6
B.10
C.7
D.9
Explanation: The method iterates through the array and checks each value. The positive numbers are 4 and 6. Their sum is `4 + 6 = 10`. Negative numbers (-3, -1) and zero (0) are excluded by `arr[i] > 0`.
8What is the primary bug in this method designed to return the maximum value from a non-empty array of integers? public static int findMax(int[] arr) { int max = 0; for (int i = 0; i < arr.length; i++) { if (arr[i] > max) { max = arr[i]; } } return max; }
A.It throws an `ArrayIndexOutOfBoundsException` on the last element.
B.It fails when all elements in `arr` are negative, incorrectly returning 0.
C.The loop skips the first element at index 0.
D.The conditional comparison should use `>=` instead of `>`.
Explanation: Initializing `max = 0` is incorrect when the array contains only negative numbers (e.g., `{-5, -12, -3}`). In that case, `arr[i] > max` is never true, and the method erroneously returns 0 instead of the actual maximum (e.g., -3). The standard fix is to initialize `max = arr[0]` and iterate from index 1.
9A square 2D matrix `int[][] mat` of dimensions N x N is symmetric if `mat[i][j] == mat[j][i]` for all valid `i` and `j`. Which nested loop header efficiently checks this property without redundant comparisons?
A.for (int i = 0; i < mat.length; i++) for (int j = 0; j < mat.length; j++)
B.for (int i = 0; i < mat.length; i++) for (int j = i + 1; j < mat.length; j++)
C.for (int i = 0; i < mat.length; i++) for (int j = 0; j < i; j += 2)
D.for (int i = 1; i < mat.length; i++) for (int j = 1; j < mat.length; j++)
Explanation: To check matrix symmetry without redundant checks, one only needs to compare elements strictly above the main diagonal (`j > i`, so `j = i + 1`) with their transposed counterparts `mat[j][i]`. Elements on the diagonal `mat[i][i]` are always trivially equal to themselves, and iterating `j` from `i + 1` checks each off-diagonal pair exactly once.
10According to De Morgan's Laws, what is the exact logical equivalent of `!(x >= 5 && y < 10)` in Java / C#?
A.x < 5 && y >= 10
B.x < 5 || y >= 10
C.x <= 5 || y > 10
D.!(x >= 5) && !(y < 10)
Explanation: De Morgan's Laws state that `!(A && B)` is equivalent to `!A || !B`. Negating `x >= 5` yields `x < 5`, negating `y < 10` yields `y >= 10`, and the `&&` operator changes to `||`. Thus, the equivalent expression is `x < 5 || y >= 10`.

About the Israel Bagrut Computer Science 5 Units Exam

The Israel Bagrut Computer Science 5 Units examination (בחינת בגרות במדעי המחשב 5 יחידות לימוד) is the pinnacle high school computing qualification administered by the Israel Ministry of Education (משרד החינוך). The curriculum rigorously evaluates students across algorithmic problem solving, structured object-oriented programming in Java or C#, linear and non-linear dynamic data structures (Node, Stack, Queue, BinNode), recursive algorithmic design, asymptotic Big-O complexity analysis, and formal computational models (deterministic and non-deterministic finite automata, regular languages, and Turing machines). Independent practice for the Israel Bagrut Computer Science exam by OpenExamPrep provides a comprehensive 100-question English-language MCQ study adaptation with detailed pedagogical explanations for every question and distractor.

Exam sponsor: Israel Ministry of Education (משרד החינוך). The requirements and fees below concern the certification or admission exam, separate from our free practice resources.

Assessment

Computer science (mada'ei ha-machshev) is examined by the Israel Ministry of Education through external written papers plus school-based components. Sheelon 899371 (2.5 hours) replaced the retired sheelon 899381 and carries 60% of the 3-unit subject grade or 36% at 5 units; sheelon 899372 (2 hours) and the school-based alternative assessment sheelon 899373 supply the remaining weight at 3 units. At 5 units the subject adds sheelon 899271 (3 hours, 40%), and a final programming project (sheelon 899589) is available as a 5-unit route. Note that at 3 units computer science counts for accumulation only and is not recognised as an advanced (mugbar) subject. This practice bank is an independent English-language MCQ study adaptation and is not a simulation of the official code-writing format.

Time Limit

2.5 hours (150 minutes) for sheelon 899371; 3 hours for sheelon 899271; 2 hours for sheelon 899372

Passing Score

55% (national passing threshold)

Exam / Certification Fees

No exam fee. The Israel Ministry of Education charges nothing to register for or sit a Bagrut examination, for school (internal) students and external (extern) candidates alike; only late registration through the MARBAG flexible examination centre (mrkz bchinh gmish) carries a per-unit charge.

Exam sponsor website

Reported exam pass rate: ~80-85%. Represents the national pass percentage among students completing the full 5-unit Computer Science track. This describes exam candidates, not OpenExamPrep users or results from using our resources. Exam sponsor website

Fees, eligibility, and exam policies can change. Confirm them with the exam sponsor before applying or paying.

Our practice resources: topics covered

We aim to reflect publicly available exam outlines and topic information in our study resources. Coverage, format, and difficulty may differ from the actual exam, and we cannot guarantee that every detail is accurate or current. Confirm exam requirements, fees, and policies with the official exam sponsor.

20%

Algorithmic Problem Solving and Fundamentals

Variables, primitive data types, boolean logic, nested conditionals, iteration patterns, functions and methods, 1D and 2D arrays, and string processing algorithms.

25%

Object-Oriented Programming (Java / C#)

Classes and instances, information hiding and encapsulation, access specifiers, constructor execution, inheritance hierarchies, super calls, method overriding, dynamic polymorphism, abstract classes, and interface contracts.

25%

Linear and Non-Linear Data Structures

Singly linked lists using generic Node<T>, LIFO Stack<T> ADT, FIFO Queue<T> ADT, recursive algorithms, BinNode<T> binary tree traversals (pre-order, in-order, post-order), search trees, and pointer-based structural mutations.

15%

Algorithmic Complexity and Searching/Sorting

Asymptotic Big-O time and space evaluation, worst-case, best-case, and average-case analysis, linear and binary search algorithms, quadratic sorting (bubble, selection, insertion), and divide-and-conquer sorting (merge sort, quicksort).

15%

Theory of Computation and Advanced Models

Formal languages, deterministic finite automata (DFA), non-deterministic finite automata (NFA), epsilon transitions, regular expressions, closure properties, grammars, and Turing machines with decidability principles.

Preparing for the Israel Bagrut Computer Science 5 Units Exam

What You Need to Know

  • Passing score: 55% (national passing threshold)
  • Assessment: Computer science (mada'ei ha-machshev) is examined by the Israel Ministry of Education through external written papers plus school-based components. Sheelon 899371 (2.5 hours) replaced the retired sheelon 899381 and carries 60% of the 3-unit subject grade or 36% at 5 units; sheelon 899372 (2 hours) and the school-based alternative assessment sheelon 899373 supply the remaining weight at 3 units. At 5 units the subject adds sheelon 899271 (3 hours, 40%), and a final programming project (sheelon 899589) is available as a 5-unit route. Note that at 3 units computer science counts for accumulation only and is not recognised as an advanced (mugbar) subject. This practice bank is an independent English-language MCQ study adaptation and is not a simulation of the official code-writing format.
  • Time limit: 2.5 hours (150 minutes) for sheelon 899371; 3 hours for sheelon 899271; 2 hours for sheelon 899372
  • Exam / certification fees: No exam fee. The Israel Ministry of Education charges nothing to register for or sit a Bagrut examination, for school (internal) students and external (extern) candidates alike; only late registration through the MARBAG flexible examination centre (mrkz bchinh gmish) carries a per-unit charge. Official sources

Using Our Practice Resources

  • Work through all 100 available questions
  • Review every answer and explanation
  • Track weak areas and revisit them
  • Use our AI tutor for tough concepts

Israel Bagrut Computer Science 5 Units: Suggested Study Strategy

1Always trace recursive methods using a call tree or recursion table, carefully tracking return values and base cases.
2When working with Node<T> and BinNode<T>, draw memory diagrams with arrows representing references to avoid null reference exceptions.
3Remember that Stack<T> and Queue<T> methods mutate the data structure; create temporary copies or auxiliary structures if you need to inspect elements without destroying the collection.
4For polymorphism questions, remember: compile-time validity is determined by the reference type, while runtime method execution is determined by the actual object instance.
5When calculating Big-O complexity for nested loops, check whether inner loop bounds depend on the outer variable or divide the problem space logarithmically.
6In automata theory, verify whether the empty word (epsilon / lambda) is accepted by checking if the initial state is also an accepting state.

Frequently Asked Questions

What is the structure of the Israeli Bagrut Computer Science 5-unit track?

The computer science subject is examined through external written papers plus school-based components. Sheelon 899371 (2.5 hours) is the current core paper and formally replaced the retired sheelon 899381; at 5 units it carries 36% of the subject grade and is combined with sheelon 899271 (3 hours, 40%), sheelon 899372 (2 hours, 24%) and school-based alternative assessment (sheelon 899373). A final programming project (sheelon 899589) is available as a 5-unit route. The papers cover programming fundamentals, object-oriented programming, data structures, algorithms and complexity, and computational models (automata theory).

Which programming languages are used in the Bagrut exam?

The Israel Ministry of Education officially supports Java and C# for the programming and data structures sections. The conceptual algorithmic patterns, data structure ADTs (Node, Stack, Queue, BinNode), and object-oriented principles are identical in both languages.

What standard data structure classes are defined in the Bagrut curriculum?

The curriculum defines standard generic classes: Node<T> for singly linked lists, Stack<T> with push/pop/top/isEmpty, Queue<T> with insert/remove/head/isEmpty, and BinNode<T> with getLeft/getRight/setValue/hasLeft/hasRight for binary trees. Students are expected to manipulate these ADTs without modifying internal implementations.

What is the passing score for the Bagrut Computer Science exam?

The minimum passing score is 55 out of 100 on the final composite grade, which combines the school internal annual grade (Magen / Tziyun Shnati) and the external state matriculation exam grade.

Is this practice bank affiliated with or endorsed by the Israel Ministry of Education?

No. This is an independent practice bank created by OpenExamPrep as an English-language study adaptation to help students reinforce concepts tested on the Israeli Bagrut Computer Science curriculum.

How are Theory of Computation concepts tested in the Bagrut?

Theory of Computation questions evaluate deterministic and non-deterministic finite automata (state diagrams and transition tables), regular language equivalence, regular expression synthesis, and basic Turing machine operation.