C Programming and Technical Programming Functions

Given an array of non-negative integers. Find if the array can be sorted(ascending) in single swap of two numbers or not. ex1 :- A = [12,14,23,42,28,33,39,25,45] should return true. since swapping 42 and 25 will sort the array A. ex2 :- A = [12,14,23,42,28,33,22,25,45] should return false.

Read Solution (Total 0)

C Other Question

void main()
{
float j;
j=1000*1000;
printf("%f",j);
}
The body of the loop contains only a semicolon, known as a