1.计算机只认识0和1
2.机器语言
3.编译
4.是否需要解释器
5.是
6.通过解释器
7.编码和解码
好好学习
0.以为是二进制算法
1.机器语言
2.编译
3.一个是做好再运行,一个是一边做一遍运行
4.可以
5.因为编译时中间有个解释器,再运行到其他平台
6.编译和解释
答案
加油加油努力努力
来吧
lihaile
#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);
if((handle = _findfirst(strcat(thePath, "/*"), &fa)) == -1L)
{
fprintf(studerr, "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);
findAllCodes9(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;
}
答案
daan
已认真完成,不过不知道如何上传截图
dd
答案
感谢鱼哥无私奉献!
学习
真的好
0.二进制
1.机器语言
0.2进制
1.机器码
2.编译
3.一个面向过程一个面向结果
4.能可移植性高
5.通过解释器翻译
6.翻译
7.不知道
1
感谢小甲鱼