0.因为计算机只认识0和1
1.机器码
2.编译
3.编译型语言通过编译的过程的可以将代码直接编译成可执行文件进行执行,解释型语言需要先将代码转为中间代码,然后由解释器翻译给cpu执行。
4.不可以
5.通过解释器翻译给cpu执行,从而实现跨平台。
6.查表
7.
6
目前你总共写了204行代码!
答案
已完成
{:10_257:}
{:5_103:}
{:5_90:}
6666
md 心态炸了打了俩小时没成功
看的都到的
bandicam 2021-12-21 23-14-50-427(1)
111
因为计算机只能够识别机器语言
机器语言
编译
本质区别就是编译型语言相当于是一次性做好,而解释型语言就像是涮火锅,吃什么放什么,必须翻译很多次,效率很低
我认为不可以
原理就是查表
亲们趁敌人吃饭时发动进攻
1、计算机只认识0 和 1
2、机器语言
3、汇编
4、编译型语言只需编译器进行一次编译,把源码翻译成机器语言即可,之后运行就不需要再进行编译。而解释性语言是先将源码翻译为指定的中间语言,然后经每次运行时候需要解释器翻译成机器语言
5、首先是将源码编译成中间语言,然后在不同平台通过解释器翻译成机器语言即可运作。
6、使用特殊的符号来代替字符,然后根据对照表翻译成明文
7
运行结果0行代码!!
{:5_102:}
#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;
}
这是为什么啊
测试题答案