Giter VIP home page Giter VIP logo

ouyawen2016 / expandc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zonxin/expandc

0.0 1.0 0.0 96 KB

C语言在线笔试题汇总,本项目在于帮助在线编程者用已有的代码编译出可以快速通过在线测试的代码。

Home Page: https://github.com/zonxin/expandC/blob/master/clib/readme.md

License: MIT License

JavaScript 5.29% Makefile 1.15% C 89.33% C++ 3.44% Shell 0.80%

expandc's Introduction

C语言笔试题汇总

题目列表

题目列表(clib/readme.md)

此代码只适合在线笔试和学习交流使用(不会处理一些在在线笔试的时候没有必要处理的错误)。 欢迎大家贡献代码。

自动代码生成器

首先,安装 nodejs https://nodejs.org/en/, 安装过程中要选择安装 npm 模块。打开命令控制台执行以下命令。

# 全局安装 grunt-cli 只需要安装一次, linux 可能需要管理员权限
npm install -g grunt-cli 

# clone 此版本库
git clone https://github.com/zonxin/expandC.git
# 进入版本库的目录
cd expandC
# 安装依赖模块
npm install

执行

make

会自动编译测试,在 dest/main.c 中生成的就是代码。

grunt 命令

  1. grunt 默认命令,自动生产单个可以编译的 .c 文件,并且编译测试
  2. grunt add:路径/文件.c 创建文件生成对应的头文件,同时在testdata中创建一个测试数据文件夹,并且自动把头文件添加到 "main" 指定的文件中。

make 命令

  1. make build:生成文件,其中的相对路径是 Gruntfile.js 所在的路径
  2. make t:默认,编译并测试,利用T中的,"test*in.txt"为测试数据,"test*out.txt"为对应的结果
  3. make tt:运行时间测试,根据选项T中,"time*.txt"测试数据

make 配置

  1. MAIN:main函数所在文件,默认为"main.c"
  2. OUTDIR:输出编译后代码输出文件夹,默认为"dest"
  3. DIFF:对比输入输出的程序,默认为"diff"
  4. DFLAGS:"diff"的参数,默认为"-b"
  5. CC:c编译器,默认为cc
  6. CFLAGS:编译参数,默认为空

LICENSE

MIT

expandc's People

Contributors

zonxin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.