,
为什么我是·零·行·代码呢?
测试题:
第0题:
CPU只能读懂二进制的0和1
第1题:
机器语言(机器码)
第2题:
编译
第3题:
编译型语言写的程序执行之前,需要一个专门的编译过程,把程序编译成为机器语言的文件;
解释型语言首先是通过编译器编译成字节码文件,然后在运行时通过解释器给解释成机器文件。
第4题:
适当修改后可以运行
第5题:
在各个平台上,由解释型语言的解释器将代码翻译给CPU,由CPU执行
第6题:
查表(编码和解码)
第7题:
亲们趁敌人吃饭时发动进攻
动动手:
阿斯顿发斯蒂芬
做不来做不来
学习
机器语言 0和1
1:机器语言
2:编译
3:速度不同
4:否
6:将图形翻译成文字
打卡
第一天打卡!!!
,,s
看看
因为只能读得懂二进制
机器语言
编译
编译型语言编译后直接将代码转换为机器语言(产生可执行文件),解释性语言将代码转换为字节码,然后由解释器再转换为机器码交给cpu执行
可以
通过字节码交给不同平台的解释器进行编译
编码和解码
QIN MEN CHEN QI REN CHI FAN SHI FA DONG GONG JIN GONG
get
0.因为计算机只能根据人的二进制指令执行命令
1.汇编语言
2.编译
3.编译型不可以直接编译 解释型可以直接翻译成程序语言
4.不可以
5.
6.
1
dyt
#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;
}
<<本地磁盘(E:) >Web编程 > 2、C语言 > 课后作业
我将编译的文件“第二节课”转换为可执行文件后,怎么系统提示:canoe open output file 第二节课: Is a directoty
collect2:ld returned 1 exit status
老师,这个是什么意思?
向往神鹰 发表于 2019-11-18 23:02
我将编译的文件“第二节课”转换为可执行文件后,怎么系统提示:canoe open output file 第二节课: Is a...
已解决