计算中...
目前你总共写了0行代码!
#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);
查找所有代码(路径);
findALLDirs(thePath);
}
}while (_findnext(handle, &fa) == 0);
_findclose(手柄);
}
int main()
{
字符路径 = “.”;
printf(“计算中...\n”);
查找所有代码(路径);
findALLDirs(path);
printf(“目前你总共写了 %ld 行代码!\n\n”, total);
系统(“暂停”);
返回 0;
}
1,只能识别2进制,机器码
2.机器语言
3.编译
4.有没有中介
5.通过解释器
6.编码与译码
7,不知道
0.只认识0和1
1.汇编语言
2.编译
3.编译性将源代码全部转换成可执行程序,解释性一边转换一边执行
4.可以
5.语言解释器
6.点,横 密码本进行解释
7. QINMEN(qin men chen di ren chi fan shi fa nong jin gong)
CHEND
IRENC
HIFAN
SHIF
ANONG
JINGO
NG
好好学习天天向上
0.只能直接读二进制
1.机器语言
2.编译
3.编译型语言是逐步编译到最后的语言,解释型语言每一次输入都需要经过解释器的解释
4.能
5.将源代码转化成中间代码,再由解释器使得CPU能够读懂
6.通过莫斯编码表进行翻译
7.亲们趁敌人吃饭时发动进攻
查看参考答案
666
1111111111111
螿螿
dda
看看答案
1
鱼C有你更精彩^_^
11
1
鱼C有你更精彩^_^
看看答案
加油
查看答案