kkkkkkkkkkkkkkk
看一看答案
see
111111111111111
0 only know machine language
1 machine language
2 compile
3 compile: source code -> compile -> object code
interpreted: source code -> intermediate code -> interpreted & run
4 no, different compiler
5 via a interpreter in different platform
6 replace
7 qinmenchendirenchifanshifadongjingong
纠正了好多遍错误,终于把代码敲完了。
参考答案
看看~
看看
凡凡殇清 发表于 2017-4-13 00:16
看看
甲鱼老师,你帮我看看,我这是错哪了,
.
{:10_256:}{:10_256:}看看答案
看。。
参考答案
0.不是0就是1
1.机器码
2.编译
3.是否编译成二进制
4.不能
5.编码
7.这个算了
本帖最后由 玉火叢生 于 2017-4-14 01:10 编辑
玉火叢生 发表于 2017-4-13 23:00
0.不是0就是1
1.机器码
2.编译
#include<io.h>
#include<direct.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 256
long total;
int countLines(const char *filename);
void findAllCodes(const char * path);
void finaALLFiles(const char *path);
int countLines(const char *filename)
{
FILE *fp;
int count=0;
int temp;
if ((fp=fopen(filename,"r"))==NULL)
{
fprintf(stderr, "can not open the file:%s\n",filename );
return 0;
}
while ((temp==fgetc(fp))!=EOF)
{
if (temp=='\n')
{
count++;
}
}
fclose(fp);
return count;
}
void findAllCodes(const char *path)
{
struct _finddata_t fa;
long handle;
char thePath,target;
strcpy(thePath,path);
if((handle=_findfirst(strcat(thePath,"/*.c"),&fa))!=-1L)
{
do {
sprintf(target,"%s%s",path,fa.name);
total+=countLines(target);
} while(_findnext(handle,&fa)==0);
_findclose(handle);
}
}
void findALLDirs(const char *path)
{
struct _finddata_t fa;
long handle;
char thePath;
strcpy(thePath,path);
if((handle=_findfirst(strcat(thePath,"/*"),&fa))==-1L)
{
fprintf(stderr,"The path %s is wrong!\n",path);
return;
}
do
{
if ((!strcmp(fa.name,".")) || !strcmp(fa.name,".."))
continue;
if(fa.attrib==_A_SUBDIR)
{
sprintf(thePath,"%s/%s",path,fa.name);
findAllCodes(thePath);
findALLDirs(thePath);
}
} while(_findnext(handle,&fa)==0);
_findclose(handle);
}
int main()
{
char path=".";
printf("计算中...\n");
findAllCodes(path);
findALLDirs(path);
printf("你目前总共写了%1d行代码!\n\n",total);
system("pause");
return 0;
}
结果:
$ ./countlines.exe
Press any key to continue . . .
计算中...
你目前总共写了0行代码!
can not open the file:.countlines.c
can not open the file:.hello.c
can not open the file:./test2main.c
-------------------------------------------
发现问题,最后一只卡住了
-----------------------------
Press any key to continue . . .
计算中...
你目前总共写了240行代码!
终于出来了,坑爹
看答案啦
0.为什么我们说计算机其实是“二傻子”
因为计算机只认识0和1
1.CPU唯一认识的语言是什么语言?
二进制语言
2.C语言编写的源代码转换为汇编语言的过程叫什么?
C语言程序到二进制行程序需要经过如下步骤:
预处理:包含头文件和替换宏
编译:将预处理后的程序转化成汇编代码
汇编:将汇编代码转换成机器码
连接:将多个目标文件以及所需的库文件链接成最终的可执行文件
所以C语言编写的源程序转换为汇编语言的过程叫编译
3.编译型语言和解释型语言的本质区别是什么?
编译型语言:一次编译,多次运行
解释型语言:边编译边运行
4.在Linux系统上用C语言编译的可执行程序,是否能在Windows系统上执行?
能,可移植性强
5.解释性编程语言是如何实现跨平台的?
通过使用特定的解释器
6.莫斯密码的原理其实是什么?
不同的长短音组合('-'或'.'),代码不同的英文字母
7.莫斯密码解密
亲们趁敌人吃饭时发动进攻
hello world
二进制傻子。