0$房天下问答|c语言..题目.帮忙做一下$https://m.fang.com/ask/ask_1401685.html$https://static.soufunimg.com/common_m/m_public/201511/images/asksharedefault.png
packc/pages/ask/detail/detail?askid=1401685
-
c语言..题目.帮忙做一下
1.请指出下列程序的功能。#include <stdio.h>void main(){int i,j;int a[3][3],b[3][3],x;for(i=0;i<3;i++) for(j=0;j<3;j++) {scnaf(“%d”,&x);a[i][j]=x;}for(i=0;i<3;i++) for(j=0;j<3;j++) b[j][i]=a[i][j];for(i=0;i<3;i++) {printf(“\n”); for(j=0;j<3;j++)printf(“%d ”,b[i][j]); }}2. 请指出下列程序的功能。#include <stdio.h>void main(){FILE *fp;char ch,filename[10];scanf(“%s”,filename);if((fp=fopen(filename,”w”))==NULL) {printf(“can not open file\n”); exit(0); }ch=getchar();ch=getchar();while(ch!=’#’) { fputc(ch,fp);putchar(ch) ch=getchar(); }fclose(fp);}
更多
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。

关注成功