banbuduo 发表于 2019-7-17 18:22:39

0和1
编译
执行机制

在不同平台上运行对应的java
查表
亲们趁敌人吃饭时发动进攻

仙杜瑞拉 发表于 2019-7-17 18:38:40

动动手

Panzer4 发表于 2019-7-17 21:53:26

2121212121

taerjiu 发表于 2019-7-17 22:01:42

二进制    机器语言      编译         不能      

cyf22 发表于 2019-7-17 22:43:59

#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_tfa;
        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;
}

帅气熊哒哒 发表于 2019-7-17 23:33:30

报错了,还不知道怎么纠正,好烦

bro丶 发表于 2019-7-18 00:12:39

hi

929252551 发表于 2019-7-18 03:55:10

写完了

492402352 发表于 2019-7-18 09:43:44

想要答案

小小源代码 发表于 2019-7-18 13:13:57

0.
1.机器码
2.编译
3..编译型代码通过编程语言…汇编语言…机器码到cpu工作
解释型语言通过解释器解释给cpu
4.可以
5.解释器
6.编译

greatsnoopy 发表于 2019-7-18 14:14:44

1

梁云纵 发表于 2019-7-18 15:29:59

C:\Users\Edison\Desktop

sanguine 发表于 2019-7-18 15:36:19

1.计算机只能识别0和1
2.机器语言
3.编译
4可以

xjj.复活 发表于 2019-7-18 16:42:29

看答案

茶底V 发表于 2019-7-18 17:04:00

终于抄完了

zxf963 发表于 2019-7-18 18:31:33

{:10_250:}

老坚果 发表于 2019-7-18 19:04:15

C:\Users\16059\Desktop\汇编\汇编\汇编70-77\074第十六章 直接定址表03

老坚果 发表于 2019-7-18 19:05:20

C:\Users\16059\Desktop\汇编\汇编\汇编70-77\074第十六章 直接定址表03\捕获.PNG

老坚果 发表于 2019-7-18 19:06:42

刚才两个不算

zzf0817 发表于 2019-7-18 19:37:57

{:5_102:}
页: 330 331 332 333 334 335 336 337 338 339 [340] 341 342 343 344 345 346 347 348 349
查看完整版本: S1E2:第一个程序 | 课后测试题及答案