Work report > Experiment report

C language experiment report "pointer"


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

Instructor: __________ Grade: __________

Experiment 5 Pointer 1, the purpose of the experiment
1, master the concept of pointers, will define and use pointer variables
2, grasp the pointer variable pointing to the array
3, grasp the use of the character string pointer Second, the experimental content
1. Enter 3 character strings and output them in order from small to large.
2. Write a function to find the length of a string of characters. Enter a string of characters in the main function and output its length.
3, improve the program, requires the use of the function: convert a string of characters into an integer. For example, if you enter the string "-1234", the function converts it to an integer value of -1234.
#include
#include
Long fun
{
Fill in the program
}
Void main
{
Char s[6];
Long n;
Printf;
Gets;
n=fun;
Printf;
}
First, third, experimental steps and process First, Fan Wenwang compiled the article, the copyright belongs to the original author, the original source all...

Fourth, the program debugging record

recommended article

popular articles