豆搜网 文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 2010C语言实验题目[1]
侵权投诉

2010C语言实验题目[1]

入实验一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.

第1页

TOP相关主题

热门文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
新浪认证  诚信网站  绿色网站  可信网站   非经营性网站备案
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.docsou.com All Rights Reserved.  闽ICP备15022310号-9  闽公网安备 35021102001881号  email
返回顶部