666666666666666666666666666666666666666
1 因为计算机只认识 0 1
2 编译
3 忘了
4 可以
5 通过解释器
6 符号对应的字母
7 亲们成我人吃饭时发动进攻
这我可太难了才7行
粉红喵喵拳 发表于 2021-1-7 23:51
这我可太难了才7行
老师为啥我的才是7行?您在网页上的复制粘贴下来也是7行?
kankan
小甲鱼最帅!!!!!
感谢楼主无私奉献
报错了7项呀。。
本帖最后由 W打烊 于 2021-1-8 11:06 编辑
0.计算机只能识别0和1.
1.机器语言
2.编译
3.编译型语言直接编译成机器语言,解释型语言先给解释器再翻译成机器语言
4.不能
5.有专门制定的解释器
6.查表,找到对应的字符
7.亲们趁敌人吃饭时发动进攻
C:\Users\Public\Pictures\Sample Pictures
回复
分不清楚1 l{:5_99:}
感谢楼主无私奉献
1
a13766971255 发表于 2021-1-8 13:00
1
为什么我显示我的lstat没有被定义呢
这是我自己在Dev-c++上打出来的,然后出现这个F:\C\collect2.exe ld returned 1 exit status,
挨着检查了没其他的问题
去网上也试试解决方法都没有用
请问这个应该怎么解决,谢谢{:10_266:}
#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);
finfAllCodes(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;
}
查看参考答案
#include<stdio.h>
int main()
{
printf("I love hello world!\n");
return 0;
}
xiexie
S1E2:第一个程序 | 课后测试题及答案 [修改]