Question: Function silly is passed an array containing n integers ( n >= 2 ).What does it do? _Bool silly(int nums[], int n) { int current

Function silly is passed an array containing n integers ( n >= 2 ).What does it do?

_Bool silly(int nums[], int n)

{

int current = 1;

_Bool flag = true;

while (current

if (nums[current]

flag = false;

}

current = current + 1;

}

return flag;

}

a.Sorts the integers in array nums into ascending (increasing) order.

b.Sorts the integers in array nums into descending (decreasing) order.

c.Returns true if the integers in array nums are sorted in descending (decreasing) order.

d.Returns true if the integers in array nums are sorted in ascending (increasing) order.

e.Returns false if the integers in array nums are sorted in descending (decreasing) order.

f.Returns false if the integers in array nums are sorted in ascending (increasing) order.

g.None of the above (the function has a bug).

The nodes in this linked list are instances of a struct that has two members, value (which stores an integer) and next (which stores a pointer to the next node).

Function silly is passed an array containing n integers ( n >=

\f

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 Programming Questions!