Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
GIAC (SANS) logo

GIAC Foundational Cybersecurity Technologies

Domain 4Objective 1

Logic & Programming GFACT Practice Questions (Page 3)

Part of the Programming and Logic domain, which makes up ~12% of our current practice bank. GIAC (SANS) does not publish an official question count, but from its 120-minute exam (~50–80 total, ~6–10 in this domain), expect 6–10 from this objective — we provide 40 practice questions to prepare you well beyond it. (estimate)

40questions here
8free pages
6concepts

Questions 11–15

  1. 11foundation · easy

    What is the primary purpose of a function in a programming language?

    Select an answer first
  2. 12expert · medium

    A program has the following code: x = 5; def foo(): global x; x = 10; foo(); print(x). What is the output?

    Select an answer first
  3. 13application · easy

    A programmer is tracing a recursive function that computes the factorial of a number. The function is: `def factorial(n): if n <= 1: return 1; else: return n * factorial(n-1)`. What is the result of `factorial(4)`?

    Select an answer first
  4. 14expert · medium

    A programmer is tracing a program that uses a global variable and a function that modifies it. The code is: `x = 10; def increment(): x = x + 1; increment(); print(x)`. The program prints 10 instead of 11. What is the most likely cause?

    Select an answer first
  5. 15application · medium

    A developer is writing a Python script to process user input. The script reads a number from the command line and then performs arithmetic. The code is: `num = input("Enter a number: ")` followed by `result = num * 2`. When the user enters `5`, the script outputs `55` instead of `10`. What is the most likely cause?

    Select an answer first
Finished these 5 questions?

Review the revealed explanations, or continue through the curriculum.

Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by GIAC (SANS). “GFACT” is a trademark of its owner, used for identification only.