Answer:
#include <iostream>
using namespace std;
void swap(int *a,int *b){ //function to interchange values of 2 variables
int temp=*a;
*a=*b;
*b=temp;
}
void sort(int queue[],int n)
{
int i,j;
for(i=0;i<n;i++) //to implement bubble sort
{
for(j=0;j<n-i-1;j++)
{
if(queue[j]>queue[j+1])
swap(queue[j],queue[j+1]); //to swap values of these 2 variables
}
}
}
int main()
{
int queue[]={6,4,2,9,5,1};
int n=sizeof(queue)/4; //to find length of array
sort(queue,n);
for(int i=0;i<n;i++)
cout<<queue[i]<<" ";
return 0;
}
OUTPUT :
1 2 4 5 6 9
Explanation:
In the above code, Queue is implemented using an array and then passed to a function sort, so that the queue can be sorted in ascending order. In the sort function, in each pass 2 adjacent values are compared and if lower index value is greater than the higher one they are swapped using a swap function that is created to interchange the values of 2 variables.
If an error occurs within a program, each of the numeric functions would return a <u>null value</u>.
<h3>What is a function?</h3>
A function refers to a named portion of a block of executable code that is written to perform a specific task, which is usually a single, related action.
Thus, a function comprises a group of related statements (block of code) that would only run and returns a data when it is called.
In Computer programming, if an error occurs within a program, each of the numeric functions would return a <u>null value</u>.
Read more on a function here: brainly.com/question/19181382
#SPJ12
Answer:
The answer is "stimulus and response"
Explanation:
The classical conditioning, which is used in research, It also used in software and computer systems theory, that design, implementation and checks performance of computer.
- It also provides the process, by which an initially supportive stimulus helps to elicit an adherence to qualities as opposed to only a biochemical mental workout.
I think It would be have to be tovuti
Answer: Refresh
Explanation:Refresh is the tool available in the operating system for the regaining the page with actual factors . It eliminates the factors that made change before in the computer.
It is also done for the quick updating of the desktop so that the work done in the system in from the initial period and not containing any previous changes.It regains the utility,refreshes the function back to active mode etc.