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

GIAC Foundational Cybersecurity Technologies

Domain 4Objective 1

Logic & Programming GFACT Practice Questions (Page 4)

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 16–20

  1. 16application · medium

    A junior developer writes a C program that allocates memory for an array of integers, fills it, and then frees it. The program compiles and runs, but occasionally crashes with a segmentation fault. The code uses `malloc()` and `free()`. Which of the following is the most likely cause of the crash?

    Select an answer first
  2. 17foundation · easy

    A program compiles successfully but produces incorrect output because a condition uses '=' instead of '==' in C. What type of error is this?

    Select an answer first
  3. 18foundation · easy

    Given two boolean values A = true and B = false, what is the result of the expression (A AND B) OR (NOT B)?

    Select an answer first
  4. 19application · medium

    A junior developer writes a Python script to count failed login attempts. The code is: attempts = 0; if attempts = 0: print('No failures'). When run, the script crashes. What is the most likely cause?

    Select an answer first
  5. 20expert · hard

    A developer is writing a Python script that reads a configuration file and sets a variable `debug` to `True` if the file contains the line `debug=true`. The code is: `if "debug=true" in content: debug = True`. The script works on the developer's machine but on the production server, `debug` is always `False` even though the file contains the line. 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.