Q: Security check can be enforced at compile time by:
-
A
A) Enabling all compiler warnings, and paying attention to these warnings
-
B
B) Writing code for large projects.F) None of the above optionsD) Adding debug traces to code.
-
C
C) Checking all pointer against null(0) values before using them.
-
D
E) A) and C)
D
Answer:
D
Explanation:
The correct answer is:
E) A) and C)
Explanation: Enabling all compiler warnings is an effective way to enforce security checks at compile time. Compiler warnings can help identify potential security issues, such as uninitialized variables, buffer overflows, and other vulnerabilities, before the code is executed. Paying attention to these warnings ensures that any potential problems are addressed early in the development process, which is crucial for writing secure code.
While other options like checking pointers against null values and adding debug traces are useful for runtime security, they are not typically compile-time checks.
Related Topic:
Share Above MCQ