Question: Assignment 1 Please finish all short answers. 1. Question 1 The code you are checking is as follows: Is there an error, if so what

Assignment 1

Please finish all short answers.

1. Question 1

The code you are checking is as follows:

Assignment 1 Please finish all short answers. 1. Question 1 The code

Is there an error, if so what is it and what does it do? What type of error?

2. Question 2

You are checking some code to generate numbers to letter grades using letters only.

The code is as follows:

if (GPA > 91 && GPA 81 && GPA 71 && GPA 61 && GPA

Are there any errors, what type of error are they? What type of error?

3. Question 3

You are doing a code review on a Web application that uses a function:

function calculatevalue (x) ( v = x+y; return v; }

The function is called in the code:

Are there any mistakes in the code? Describe any problem that exists and classify the type of error.

Question 4

You are asked to do a code review on an application that displays prices after the price has been increased. There is to be a 10% increase and the code is listed as follows:

newPrice = CurrentPrice * 0.10; display (New + newPrice);

Is there an error? Describe any problem that exists and classify the type of error.

Question 5

This example function in C to calculate the average of two numbers.

int average(int a, int b) { return a + b / 2; }

Is there an error? Describe any problem that exists and classify the type of error.

static OSStatus SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams, uint8_t *signature, UInt16 signatureLen) OSStatus err: if ((err = SSLHashSHA1.update(&h as hCtx, goto fail; &serverRandom)) != 0) ((err &sig nedParams)) 0) SSLHashSHA1.update(&h as hCtx, goto fail; goto fail; if != ((err &hashOut)) 0) SSLHashSHA1.final(6hashCtx, goto fail; if != = fail: SSLFreeBuffer(&signedHashes) SSLFreeBuffer &hashCtx); return err

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!