小甲鱼棒棒棒棒棒棒棒
感谢分享
感谢作者
fighting!!!
谢谢小甲鱼
0.不知道
1.机器码
2.编译
3.解释型语言需要解释器
4.不知道
5.把源码转换成中代码,然后发送给解释器再翻译给CPU
6.查表
7.亲们趁敌人吃饭时发动进攻
0.因为计算机cpu只能识别二进制的0和1;1.机器码;2.编译;3.编译型语言可以通过编译的过程将源代码转换为机器码被机器读懂;而解释型语言不能直接转换为机器码,而是将源代码转换为中间代码,然后发送给解释器,解释器把其翻译使得机器能够读懂;4.能;5.将中间代码发送给解释器;6.解码与编码;qinmen chen di ren chifan shi fa dong jin gong 亲们,趁敌人吃饭时,发动进攻。
看看答案是啥
2020.9.19
阿巴
fish fish
day1
谢谢鱼老师
感谢楼主
1,因为它之认识0和1
2,机器语言
3,编译
4,不能,得安装linux虚拟机
5,通过解释器翻译给不同的平台
6,通过点和线的组合代表不同的信息,通过信息的再次组合变成我们所交流的语言
7,
答案
带你学C带你飞
为什么我编辑打开了是204行代码的?
不知道怎么进入编程界面啊
为什么我运行出来时204行代码的{:10_243:}
#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;
}