on-internet
← Community

Create a Function which will tell us if an array is sorted or not in C programming

Stack Overflow ·

New to C programming ^^. I am working on an assignment, and I have to create a function that verifies if my array is sorted. I have to use a predefined template of code and solve it in a certain way. Description : Let's create a function which will tell us if an array is sorted or not. What is sorted? :-) Write a function that takes an integer array as a parameter (input) and returns a boolean (true/false). Your function should return true if the integer array is sorted in either ASC(ascending) or DESC(descending) order. Your function should return false if the integer array is not sorted. Num

Comments

Sign in or sign up to comment and upvote.

No comments yet.