All Practice Exams

Free Practice Questions for BAC Informatics

Exam-style questions and explanations by OpenExamPrep.

✓ No registration✓ No credit card
100+ Questions
100% Free

Loading practice questions...

Sample BAC Informatics Practice Questions

Try these sample questions to review concepts for the BAC Informatics exam. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1Given the prime factorization of a positive integer n = 360 = 2³ × 3² × 5¹, what is the total number of positive divisors of n?
A.24
B.18
C.12
D.30
Explanation: The number of positive divisors of an integer with prime decomposition p₁^(a₁) × p₂^(a₂) × ... × p_k^(a_k) is given by (a₁ + 1)(a₂ + 1)...(a_k + 1). For n = 360 = 2³ × 3² × 5¹, the number of divisors is (3 + 1)(2 + 1)(1 + 1) = 4 × 3 × 2 = 24. This formula accounts for every independent choice of prime exponent from 0 to a_i.
2In an optimized primality test for an integer n > 1, why is it sufficient to check potential divisors d in the range 2 ≤ d ≤ √n?
A.Because every composite number n has only prime factors strictly smaller than √n
B.Because if n has a divisor d > √n, the paired divisor n / d must satisfy n / d < √n
C.Because prime numbers cannot have more than √n total bits in their binary form
D.Because all divisors greater than √n are guaranteed to be even numbers
Explanation: If a composite number n is factored into two divisors a and b such that a × b = n, it is mathematically impossible for both a and b to be strictly greater than √n, because then a × b would exceed n. Therefore, at least one divisor must satisfy d ≤ √n. If no divisor is found in that range, no complementary divisor can exist above √n, confirming primality.
3Consider the following Euclidean algorithm implementation in C++: int gcd(int a, int b) { while (b != 0) { int r = a % b; a = b; b = r; } return a; } What value is returned when executing gcd(84, 36)?
A.6
B.4
C.12
D.18
Explanation: In the first iteration, r = 84 % 36 = 12, so a becomes 36 and b becomes 12. In the second iteration, r = 36 % 12 = 0, so a becomes 12 and b becomes 0. The loop terminates because b == 0, returning a = 12, which is the greatest common divisor of 84 and 36.
4Consider the following C++ code snippet for processing the digits of an integer n: int n = 47253, s = 0; while (n > 0) { int c = n % 10; if (c % 2 != 0) s += c; n /= 10; } What will be the final value stored in variable s?
A.6
B.21
C.9
D.15
Explanation: The loop extracts the digits of n from right to left: 3, 5, 2, 7, and 4. The condition c % 2 != 0 filters for odd digits. The odd digits are 3, 5, and 7, whose sum is 3 + 5 + 7 = 15.
5Which C++ fragment constructs the decimal reverse of non-negative n, assuming n and its reverse fit in int?
A.int inv = 0, aux = n; while (aux > 0) { inv = inv * 10 + aux % 10; aux /= 10; }
B.int inv = 0, aux = n; while (aux > 0) { inv = inv + aux % 10; aux /= 10; }
C.int inv = 0, aux = n; while (aux > 0) { inv = (inv * 10) + aux / 10; aux %= 10; }
D.int inv = 0, aux = n; while (aux > 0) { inv = inv * 10 + aux; aux /= 10; }
Explanation: To build the reverse of a number, we repeatedly shift the accumulated reverse one decimal position to the left (inv = inv * 10) and add the last digit of the remaining number (aux % 10), then truncate the last digit with aux /= 10. Comparing the reconstructed inv with the original n determines if n is a palindrome.
6What is the binary (base 2) representation of the decimal integer 53?
A.110111
B.110101
C.101101
D.111001
Explanation: Successive division of 53 by 2 yields: 53 = 26×2 + 1, 26 = 13×2 + 0, 13 = 6×2 + 1, 6 = 3×2 + 0, 3 = 1×2 + 1, 1 = 0×2 + 1. Reading remainders from bottom to top yields 110101₂. Equivalently, 32 + 16 + 4 + 1 = 53.
7Two positive integers a and b satisfy gcd(a, b) = 14 and lcm(a, b) = 420. What is the value of their product a × b?
A.2940
B.4340
C.5880
D.8400
Explanation: A fundamental theorem of elementary number theory states that for any two positive integers a and b, the product of their greatest common divisor and least common multiple equals their product: gcd(a, b) × lcm(a, b) = a × b. Therefore, a × b = 14 × 420 = 5880.
8Consider the integer n = 720. How many distinct prime factors does n have, and what is the sum of the exponents in its canonical prime factorization?
A.4 distinct prime factors, exponent sum = 8
B.2 distinct prime factors, exponent sum = 6
C.3 distinct prime factors, exponent sum = 6
D.3 distinct prime factors, exponent sum = 7
Explanation: Factoring 720: 720 = 72 × 10 = (8 × 9) × (2 × 5) = 2⁴ × 3² × 5¹. The distinct prime factors are 2, 3, and 5 (a total of 3 distinct primes). The sum of their exponents in the canonical factorization is 4 + 2 + 1 = 7.
9What is the largest integer exponent e such that 5^e divides 100! exactly?
A.24
B.20
C.25
D.22
Explanation: By Legendre's formula, the exponent of a prime p in the factorization of n! is given by E_p(n!) = ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + ... For n = 100 and p = 5: ⌊100/5⌋ + ⌊100/25⌋ + ⌊100/125⌋ = 20 + 4 + 0 = 24. Thus, 5²⁴ divides 100!, but 5²⁵ does not.
10In the Sieve of Eratosthenes algorithm for finding all prime numbers up to N, why does the inner marking loop for a prime p begin at p × p instead of 2 × p?
A.Because p × p is the first composite number whose square root is prime
B.Because all composite multiples k × p with k < p have already been marked by smaller prime factors of k
C.Because even multiples of p are automatically marked during array allocation
D.Because starting at 2 × p would cause integer overflow for all primes p > 2
Explanation: Any composite multiple m = k × p with k < p must possess at least one prime divisor q that satisfies q ≤ k < p. That prime factor q will have already visited and marked m when q was processed earlier in the sieve. Therefore, the smallest multiple of p that has not yet been eliminated by any smaller prime is p × p.

About the BAC Informatics Exam

Independent practice for Examenul Național de Bacalaureat, Informatică (Proba E.d). Independent English-language MCQ study adaptation. It is not an official translation, an official-format simulation, or a substitute for Romanian-language reading and writing, full worked solutions, or oral and practical preparation. Romanian is confirmed. Candidates who studied a subject in a minority language may request that language under the methodology; availability depends on the subject and route. Use the C/C++ or Pascal paper for your specialisation. This bank mainly uses C/C++; write and trace complete programs on paper.

Exam sponsor: Ministerul Educației și Cercetării / Centrul Național pentru Curriculum și Evaluare (CNCE). The requirements and fees below concern the certification or admission exam, separate from our free practice resources.

Assessment

Question count not published by the exam provider

Time Limit

180 minutes (3 hours)

Passing Score

At least 5/10 in every written paper and an overall written mean of at least 6/10, with required competence assessments completed or recognised. The methodology rounds an overall 5.99 to 6.00.

Exam / Certification Fees

First two Bacalaureat presentations are free; later presentations carry an annually set fee. A current later-attempt amount is not confirmed here.

Exam sponsor website

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

Official sources

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.

Not officially weighted here

Algorithms and programming

Control structures, numerical algorithms, complexity and subprograms.

Not officially weighted here

Data processing

Arrays, matrices, character strings and text files.

Not officially weighted here

Problem-solving techniques

Backtracking, greedy methods, divide and conquer and graph representations, subject to specialisation.

Preparing for the BAC Informatics Exam

What You Need to Know

  • Passing score: At least 5/10 in every written paper and an overall written mean of at least 6/10, with required competence assessments completed or recognised. The methodology rounds an overall 5.99 to 6.00.
  • Assessment: Question count not published by the exam provider
  • Time limit: 180 minutes (3 hours)
  • Exam / certification fees: First two Bacalaureat presentations are free; later presentations carry an annually set fee. A current later-attempt amount is not confirmed here. 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

BAC Informatics: Suggested Study Strategy

1Use the C/C++ or Pascal paper for your specialisation. This bank mainly uses C/C++; write and trace complete programs on paper.
2Use official papers and marking schemes for the applicable profile. Practise writing complete answers under the three-hour limit.
3Use the questions to identify gaps, then explain why each alternative fails without looking at the feedback.

Frequently Asked Questions

Is this the official examination format or an official translation?

Independent English-language MCQ study adaptation. It is not an official translation, an official-format simulation, or a substitute for Romanian-language reading and writing, full worked solutions, or oral and practical preparation.

What else does the full Bacalaureat require?

Other written papers and required competence assessments: Romanian oral communication, mother-tongue oral communication where applicable, a studied foreign language and digital competence. These must be completed or formally recognised. The subject bank does not replace them.

Which paper and language should I prepare for?

Romanian is confirmed. Candidates who studied a subject in a minority language may request that language under the methodology; availability depends on the subject and route. Use the C/C++ or Pascal paper for your specialisation. This bank mainly uses C/C++; write and trace complete programs on paper.