入实验一Functions and Program Structure
实验要求:必做
1.掌握C语言的函数的定义;
2.学会C函数的语法结构,会用C语言实现函数的功能;
3.回顾C语言基础部分的学习。
实验内容:
1.了解和使用VC集成开发环境
2.熟悉VC环境的基本命令和功能键,熟悉常用的功能菜单命令
3.学习使用C语言实现函数的编写
4.理解函数的调用过程
实验题目:
1.Write the function fun, which computes the result of y x, and use the main
function to call this function for testing.
2.Write the function strrindex (s, t), which returns the position of the rightmost
occurrence of t in s, or -1 if there is none.
编写一个函数strrindex(s, t),用于返回字符串t在s中最右出现的位置,如果s中不包含t,那么返回-1。
3.Imitating the function atoi, which can convert the numeric string to an
integer?
实验二Point and Arrays
实验要求:必做
1.掌握数组的概念和使用方法
2.掌握数组的初始化方法
3.会用字符数组处理字符串
4.了解数组名作函数参数
5.掌握指针变量的定义,会使用指针变量
6.掌握指针与变量、指针与数组、指针与字符串的关系
7.了解和会用指针作为函数参数的方法。
实验内容:
1.数组定义,初始化和数组元素的访问
2.二维数组的使用和在字符串处理中应用
3.使用字符串处理函数
4.指针的概念,了解内存空间的概念
5.指针变量和指针所指向的变量
6.函数参数传递的两种方式:按值传递和按地址传递
实验题目:
1.Enter 10numbers from the keyboard, write a program to find the maximal number and
its subscript, and then arrange them from the biggest to the smallest, put the result in
the array.
2.Write a pointer version of the function strcat that we showed in Chapter 2:
strcat(s, t) copies the string t to the end of s.
3.Write a pointer version of the function,which can find the max number’s id
of row and line number. In addition, the numbers are in a two-dimension array.
闽公网安备 35021102001881号 
热门文档