For the following questions check Squareroot the correct ans

For the following questions, check (Squareroot) the correct answer: The strcmp(str1, str2) function returns zero if str1 is less than str2 str1 is greater than str2 str1 equals str2 none of the above The value of the expression -6 - 1 * 3 is 6 1 3 none of the above Using myArray in Question 5, myArray[7] % myArray[8] is 0 1 2 none of the above

Solution

2)

(i)

strcmp(str1, str2) Returns 0 if str1 and str2 are the equal.

Option 3 is correct choice.

(ii)

The value of the expression -6-1*3 is

Based on the priority ordrer (BODMAS)

Multiplication has highest priority.

so perform -1*3 = -3

so the expression becomes -6-3= -9

None of the above is correct choice.

Option 4 is correct choice.

(iii)

int myArray[] = {-1,3,-9,9,33,-4,-5,10,4,-23}

myArray[7] value is 10

myArray[8] value is 4

myArray[7] % myArray[8] = 10%4 = 2 (2 is a reminder value)

Option 3 is correct choice.

 For the following questions, check (Squareroot) the correct answer: The strcmp(str1, str2) function returns zero if str1 is less than str2 str1 is greater than

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site