Question: Directions These questions require you to write small C/C++ programs to demonstrate certain features. You should write a program to answer each question. You must
Directions
These questions require you to write small C/C++ programs to demonstrate certain features. You should write a program to answer each question. You must test your program(s) in Microsoft Visual Studio 2017 and show us the final product (C/C++ code and a sample run). Do not forget to explain the purpose of the programs in plain English.
Questions
1.) Present a complete and syntactically correct example of C/C++ code that prevents wrap around when either unsigned int OR unsigned short data types (select one data type) is converted to signed char. Explain in English which vulnerabilities are being prevented.
2.) Present a complete and syntactically correct example of C/C++ code that prevents overflow by unary negation with signed int or signed char data types (select one data type). Explain in English which vulnerabilities are being prevented.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
