0
'/' '\'
huifu
0、因为计算机识别不了我们的语言
1、CPU唯一认识的语言是及机器语言
2、预处理
3、编译型语言可以直接生成可执行化程序,但是解释型语言需要一个解释器去解释其次才能生成可执行画爱程序
4、也许有些代码会存在些许的差别,所以大概率不能直接运行
5、解释型语言中的解释器会在不同平台将其代码转换成该平台的模式
6、解密
qaq
谢谢分享
11
fighting
0.计算机只懂得0和1,本质逻辑是灯泡的开关。
1.机器语言。
2.编译。
3.人能否读懂。
4.不能。
5.不知道。
6.符号学,类似ascii,人为给出定义。
7.不知道。
{:5_109:}
#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 findALLFiles(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("目前你总共写了 %ld 行代码!\n\n", total);
system("pause");
return 0;
}
写完啦
二进制的原因吗
机器语言
编译
解释型语言效率没有编译语言快
可以
将源码转换成中间代码,然后发送给解释器,由解释器逐句翻译给 CPU 来执行。
查表
QINMENCHENDIAEENCHIFANSHIFADONGJINGONG
路过点赞
0、计算机智能识别二进制
1、机器码
2、编译
3、编译型语言直接编译为机器码,解释型语言生成中间码,把中间码发送给解释器,解释器再转换成机器码
4、可以
5、不同平台使用不同解释器
6、查表
7、亲们趁敌人吃饭时发动进攻
{:5_90:}
{:5_95:}
本帖最后由 NaAugust 于 2022-4-3 14:18 编辑
0.只懂得二进制的0和1
1.机器语言
2.编译
3.编译语言:源代码最终编译成机器代码
解释性代码:不直接编译成机器语言,将源代码转换为中间代码发送给解释器,由解释器翻译给CPU执行
4.可以
5.源代码不修改或稍加修改,即可实现跨平台
6.对着编文解码
7.亲们趁敌人吃饭时发动进攻
答案
0.计算机听不懂人话
1.机器语言
2.编译
3.有没有编译成机器语言
4.能
5.解释器
6.二进制
7.不知道