Work report > Experiment report

C language experiment report "array"


Student ID: __________ Name: __________ Class: __________ Date: __________

Instructor: __________ Grade: __________

Experiment 3 Array one, the purpose of the experiment
1, master the definition, assignment and input and output of one-dimensional and two-dimensional arrays
2, grasp the use of character arrays and character string arrays
3, master the sorting algorithm related to the array II, the experimental content
1. There is already an ordered array. After inputting a number, insert it into the array according to the original sorting rule.
2. Re-store the values ​​in an array in reverse order. For example, the original order is 8, 6, 5, 4, 1. The requirements were changed to 1, 4, 5, 6, 8.
3, the following program is to sort the n elements in the array in order of small to large according to the selection method, please correct the errors in the program to make it run normally.
#include
#define N 20
Void main
{
Int a[N]={9,6,8,3,-1};
Int i,m;
Printf;
For(i=0;i

recommended article

popular articles