Question
Question 1: Declaring a variable as type integer: a)Allocates an infinite amount of storage b)Allocates a fixed amount storage Question 2: An integer error in
Question 1: Declaring a variable as type integer: a)Allocates an infinite amount of storage b)Allocates a fixed amount storage Question 2: An integer error in C++ or Java causes: a)a syntax error b)the program to correct itself c)unexpected behavior Question 3: How can you avoid an integer error in your program? (Hint: it might have multiple correct answer) a)Know the smallest and largest allowable values for each data type in the programming language you are using b)Always pick float or double as the data type for numbers c)Check your input for reasonable values before conducting mathematical operations
Question 8 Fill out the following table: Security Checklist Vulnerability: Integer Errors Check each line of code 1. Type the names of all integer variables. For each variable: 2. Type all lines of code that assign values to the variable. 3. Type all lines of code that involves mathematical operations with variables. 4. Type all lines of code in which assignments are made to the variable. Highlighted areas indicate vulnerabilities!
Programming section (Note: refer Background and Code Responsibly sections to answer the Assignment.) STEP 1: Type program 1 and compile. Run and enter reasonable integer values. The steps to create a new ctt project to run program 1 is available on the blackboard Program 1 #include using namespace std; int main ) int i int j coutStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started