C语言题目要求编程 100分送上
<p>C语言题目要求编程 100分送上</p><p><img src="http://img.baidu.com/img/iknow/icn_point.gif"> 悬赏分:100 -</p>
<p>解决时间:2010-1-18 15:44</p>
<p>1.编写一个函数实现对长度为len的一维数组排序。函数原型为:</p>
<p>viod sort( int*p,int len )</p>
<p>2.DOS提示符下输入命令copy file1.txt file2.txt 就把文件file1.txt以名称file2.txt复制一份。编写一个程序实现copy的功能</p>
<p>3.编写一个函数,统计字符串中字母、数字、空格和其他字符的个数,并将结果输出在显示器上。字符串由函数的形参传递给函数,要求使用函数原型:void CountChar(char *str )</p>
<p>4. 学生名册中的数据包括学生的学号,名称,年龄,性别,电话,系别。</p>
<p>如20090012348,Li Shanshan ,20,F,13818026295,physics</p>
<p>编写一个程序实现100名学生的信息录入。(要求运用结构体数据类型)</p>
<p>提问者: shwflower - 二级</p>
<p>最佳答案</p>
<p>// x.cpp : Defines the entry point for the console application.</p>
<p>//</p>
<p>#include "stdafx.h"</p>
<p>#include "fstream"</p>
<p>#include "iostream"</p>
<p>using namespace std;</p>
<p>int main(int argc, char* argv[])</p>
<p>{</p>
<p>ifstream file1;</p>
<p>ofstream file2;</p>
<p>file1.open(argv);</p>
<p>if (file1.is_open())</p>
<p>{</p>
<p>char text;</p>
<p>file1.getline(text,1024,\'\0\');</p>
<p>file2.open(argv,ios_base::out);</p>
<p>if (file2.is_open())</p>
<p>{</p>
<p>file2<<text;</p>
<p>}</p>
<p>}</p>
<p>else</p>
<p>{</p>
<p>cout<<"要复制的文件不存在,请检查输入";</p>
<p>}</p>
<p>return 0;</p>
<p>}</p>
<p>0</p>
<p>回答者:</p>
<p>南坪中学校帅 - 六级 2010-1-17 15:23</p>
<p>我来评论>></p>
<p>提问者对于答案的评价:</p>
<p>谢谢 QQ上帮我解答了</p>
页:
[1]