Write a program using C language that sorts the 10 rollno,s of your class placed in an array of size 10?Input:87109132546 Output:12345678910
Question
Solution 1
Sure, here is a simple C program that sorts an array of 10 roll numbers:
#include <stdio.h>
void sort(int a[], int n) {
int i, j, temp;
for (i = 0; i < n-1; i++) {
for (j = 0; j < n-i-1; j++) {
if (a[j] > a[j+1]) {
temp = a[j];
a[j] =
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI
Similar Questions
Write a C++ program that will input 10 array elements and output the following.elements in original orderelements in reverse ordersmallest element
Write a program that declares an array of size 5. Input values in the array from user, and then display allvalues of array
The sort method of the Arrays class sorts the elements of an array by using a comparator A. True B. False
What is argv?An array containing the program compilation flagsAn array containing the program command line argumentsAn array of size argc
Write a Java program to check if the sum of all the 10's in the array is exactly 30. Return false if the condition does not satisfy, otherwise true.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.