
GIAC Foundational Cybersecurity Technologies
Domain 4Objective 1
Logic & Programming GFACT Practice Questions (Page 2)
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 6–10
- 6
A script processes a list of IP addresses. It should print each IP that is not in the blocklist. The code is: for ip in ip_list: if ip in blocklist: continue; print(ip). What is the effect of the continue statement?
Select an answer first - 7
A developer is debugging a C program that crashes with a segmentation fault. The program uses a pointer to an integer and assigns a value to it. The code is: `int *ptr; *ptr = 10;`. What is the most likely cause of the crash?
Select an answer first - 8
In C, what is the primary purpose of the malloc function?
Select an answer first - 9
What is the typical order of execution in a program that uses a loop and a function?
Select an answer first - 10
A C developer is writing a program that needs to allocate memory for a dynamic array of strings. The developer uses `malloc()` to allocate memory for the array, but later the program crashes when trying to access an element. 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.