0:因为我们计算机只能识别二进制指令
1:机器语言
2:编译
3:编译型语言需要通过编译器将源代码编译成目标平台的可执行文件,之后运行时就不需要在编译;而解释型语言不需要提前编译,直接通过解释器逐行解释源代码并执行
4:不能
5:解释器
6:用不同长度的点和线组成不一样的顺序和长短来表示字母、数字和符号的编码方式
#include<stdio.h>
int main()
{
printf("Hello World!\n");
return 0;
}
1.机器语言 它有二进制的0和1组成
2.编译 具体是编译过程中的编译前端阶段 会将C语言源代码转换为汇编代码
3.是否在运行前生成目标平台的机器码
4.不能 这俩的操作系统内核 文件格式 系统调用接口都不同 编译生成的可执行程序以来对应的系统环境 无法直接跨系统运行
5.中间层
6.用不同长度的电信号点划间隔来表示字母数字和符号
7.小甲鱼带你学c带你飞
幸苦了
hello
{:10_327:}
111
不,我坚决不同意楼主的看法!
n
111
{:13_443:}
1
"C:\Users\23813\Pictures\Screenshots\屏幕截图 2026-03-20 170014.png"
#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 findALLDirs(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_284:}
CPU 唯一真正认识、能直接执行的语言:机器语言(二进制代码)
.
,