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

GIAC Foundational Cybersecurity Technologies

Domain 4Objective 1

Logic & Programming GFACT Practice Questions (Page 8)

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 36–40

  1. 36application · medium

    A developer is reviewing a JavaScript function that should return the sum of two numbers. The code is: function add(a, b) { return a + b; }. When called with add('2', 3), it returns '23' instead of 5. What type of error is this?

    Select an answer first
  2. 37foundation · easy

    What is the result of the XOR operation on two boolean values when both inputs are true?

    Select an answer first
  3. 38application · easy

    A program has the following pseudocode: function main() { x = 10; y = double(x); print(y); } function double(n) { return n * 2; }. What is the output?

    Select an answer first
  4. 39expert · medium

    A developer is writing a C program that reads an integer from user input. The code is: int num; scanf("%d", &num);. The program crashes when the user enters a non-numeric value. What is the most likely cause?

    Select an answer first
  5. 40application · medium

    A network administrator writes a script to check if a server is reachable. The script uses a function check_server() that returns True if the server responds. The main code is: if check_server(): print('Up') else: print('Down'). The script prints 'Down' even though the server is up. What is the most likely cause?

    Select an answer first
Finished these 5 questions?

Review the revealed explanations, or continue through the curriculum.

No more pagesBack to GFACT

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.