摘要:
实验任务三 基于运行观察,回答实验任务3中的问题: 1.运行程序,观察在屏幕上是否正确输出了按分数由高→低排序的信息?同时,在当前路径下,是 否生成了文本文件file3.dat? 正确输出了按分数由高到低排序的信息。在当前路径下,生成了文本文件file3.dat 2.尝试用记事本程序打开文件file 阅读全文
摘要:
// P280例8.15 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 typedef s 阅读全文
摘要:
#include<stdio.h> const int N=3; int main(){ int a[N]={1,2,3}; int i; printf("通过数组名及下标直接访问数组元素:\n"); for(i=0;i<N;i++) printf("%d:%d\n",&a[i],a[i]); pr 阅读全文
摘要:
#include<stdio.h> int func(int, int); int main() { int k=4,m=1,p1,p2; p1=func(k,m) ; p2 = func(k,m) ; printf("%d,%d\n",p1,p2); return 0;} int func(int 阅读全文