lst = short_names.split()
print(sorted(lst,reverse = True))
Answer:
The correct answer is:
C. ndx = 0;
while (ndx < 3) {
ar[ndx] = 0;
ndx++;
}
Explanation:
The declaration given is:
int ar[3];
This means the array consists of three locations and is named as ar.
We know that the indexes are used to address the locations of an array and the index starts from 0 and goes upto to 1 less than the size of the array which means the indexes of array of 3 elements will start from 0 and end at 2.
Now in the given options we are using ndx variable to run the while loop.
So the code to assign zero to all elements of array will be
ndx = 0;
while(ndx<3)
{
ar[ndx] = 0;
ndx++;
}
Hence, the correct answer is:
C. ndx = 0;
while (ndx < 3) {
ar[ndx] = 0;
ndx++;
}
Answer: Multitasking is the ability of the operating system by which a processor is able to process multiple task at the same time.
Cooperative multitasking is non preemptive multitasking where the processor is assigned to a single process and does not preempt until it completes its jobs or moves to a waiting state.
Explanation:
In Multitasking jobs are executed at a faster rate than as many jobs or tasks can be assigned to the processor at the same time.
In cooperative multitasking due to the non preemptive nature a single job could be assigned to the cpu at a time.