{:5_95:}
感谢
{:9_222:}
忘记了一些
测试
回复
对答案
答案
查看答案
0.只能识别机器语言
1.机器语言(二进制0和1)
2.编译
3.CPU能否直接执行
4.可以
5.解释器
6.编码
7.亲们趁敌人吃饭时发动进攻
{:5_109:}
#include <io.h>
#include <direct.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 256
long tatle;
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;
}
{:10_277:}
努力学习,冲~!!!2020.8.24
回复看答案嘿嘿
为什么我们说计算机其实是“二傻子”
11111
好!
让我康康答案
答案