13

Please solve this assignment question I don't have much knowledge in C

 2 years ago
source link: https://www.codeproject.com/Questions/5317517/Please-solve-this-assignment-question-I-dont-have
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

See more:

Create a user defined function task1 () which should accept 1D array and its size (no. of elements) from main () function. This function should return the index of smallest prime element from the given array. Make another function task2() which should insert the returned value from task1() at the beginning of array and also sorts the array in ascending order. After executing task2() display the updated array content on the screen through main () function..

Sample Input:
No. of array elements:5
Array elements: 12,19,5,13,16 // Here 5,13 and 19 are prime elements and 5 is the smallest prime element and its index:2 will be returned.

Sample Output:
2,5,12,13,16,19 //Index of smallest prime element, i.e., 2, is inserted at the beginning and sorted in ascending order.

What I have tried:

I Don't have much idea in C I tried it to code it in java but they are not accepting it


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK