
GIAC Foundational Cybersecurity Technologies
Domain 4Objective 1
Logic & Programming GFACT Practice Questions (Page 6)
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 26–30
- 26
A C program allocates memory for a string using malloc() and later calls free() on the pointer. After freeing, the programmer accidentally uses the pointer again. What is this type of error?
Select an answer first - 27
A C programmer needs to allocate memory for a dynamic array of structs. The programmer uses malloc() but forgets to multiply by the size of the struct. What is the most likely result?
Select an answer first - 28
A security analyst is writing a script to filter network alerts. The script should trigger an alert only when both the source IP is in the internal range AND the destination port is 22. The analyst writes: `if (source_internal AND dest_port == 22): alert()`. During testing, the alert fires when the source is internal but the destination port is 443. What is the most likely cause?
Select an answer first - 29
Which of the following is a valid variable declaration and assignment in Python?
Select an answer first - 30
A developer is debugging a C program that crashes when it tries to free a pointer. The pointer was allocated with malloc() and has not been freed before. What is the most likely cause of the crash?
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.