摘要:
题目:时间函数举例1 程序分析:无。 程序源代码: 1 #include <stdio.h> 2 #include <time.h> 3 4 int main () 5 { 6 time_t rawtime; 7 struct tm * timeinfo; 8 9 time ( &rawtime ) 阅读全文
摘要:
题目:专升本一题,读结果。 程序分析:无。 程序源代码: 1 #include<stdio.h> 2 #include<stdlib.h> 3 4 #define M 5 5 int main() 6 { 7 int a[M]={1,2,3,4,5}; 8 int i,j,t; 9 i=0;j=M- 阅读全文
摘要:
题目:某个公司采用公用电话传递数据,数据是四位的整数,在传递过程中是加密的,加密规则如下: 每位数字都加上5,然后用和除以10的余数代替该数字,再将第一位和第四位交换,第二位和第三位交换。 程序分析:无。 程序源代码: 1 #include <stdio.h> 2 3 int main() 4 { 阅读全文
摘要:
题目:读取7个数(1—50)的整数值,每读取一个值,程序打印出该值个数的 *。 程序分析:无。 实例: 1 #include<stdio.h> 2 #include<stdlib.h> 3 int main() 4 { 5 int n,i,j; 6 printf("请输入数字:\n");i--; 7 阅读全文
摘要:
题目:回答结果(结构体变量传递)。 程序分析:无。 实例: 1 #include<stdio.h> 2 3 struct student 4 { 5 int x; 6 char c; 7 } a; 8 9 int main() 10 { 11 a.x=3; 12 a.c='a'; 13 f(a); 阅读全文
摘要:
题目:两个字符串连接程序 。 程序分析:无。 程序源代码: 1 #include <stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 5 char* strconnect(char *str1,char *str2); 6 7 int main 阅读全文