+1
求答案
0.因为计算机只懂得0和1
1.机器语言
2.编译
3. 编译型语言在程序执行之前,有一个单独的编译过程,将程序翻译成机器语言,以后执行这个程序的;
解释型语言,是在运行的时候将程序翻译成机器语言
4.不可以
5.解释型语言在运行的时候将程序翻译成机器语言,所以可以实现跨平台
6.查表
7.亲们,趁敌人吃饭时发动进攻
shui
yao
#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;
}
想看答案
0.机器语言
1.编译
3.目标文件
4.不能
5.可执行文件
6.编译
7.不知道
1
给我看看答案
Hello,world
66666666
6666666666
112
0. 因为计算机只认识0和1
1. 机器语言。
2. 编译。
3. 编译型语言,运行效率高,迁移性好。可以直接将人编写的语言,编译成汇编语言然后翻译成机器语言。解释型语言,是先将人编写的语言需要解释器,才能解释成机器能够看懂的语言。运行效率较低。
4.可以。
5. 通过不同的解释器来实现跨平台。
6. 通过指令表来进行翻译。
7. Q i n m e n
c h e n d
i r e n c
h i q a n
s h i f
a d o n g
j i n g o ng
朕想知道
大佬牛逼
1
课后测试题答案
课后测试题及答案