[Operating System] {ud923} L0: Course Readiness Survey | P1L1: Course Overview

 

C Programming Examples

Here are a few snippets written in C that are a good representation of the code listings you might see in this course. It is suggested that you follow the links and browse the source code listings. If necessary, download the various samples and run them locally to verify your understanding.

C Source Listings

 

 

 

 

 

 

Makefile Example

If you have never used Makefiles before, then here is a great tutorial explaining how they work (tutorial uses g++ instead of gcc).

While more complex syntaxes are possible, we have limited the following Makefile example to something that is both simple and readable. If you can understand this example, then you should be capable of following the Makefile policy for the course's projects.

 

# specify the compiler
CC=gcc

# specify options for the compiler
CFLAGS=-c -Wall

all: hello

hello: main.o hello.o
    $(CC) main.o hello.o -o hello

main.o: main.cpp
    $(CC) $(CFLAGS) main.cpp

hello.o: hello.cpp
    $(CC) $(CFLAGS) hello.cpp

clean:
    rm -rf *o hello

  

 


 

 

 

 

 

 

 

All course materials will be made available on the Course Wiki.

Reference Books

 

 

 

 

 

 

 

 

 

 

Errata

For team collaboration, specific details about how teams will be formed and managed will be distributed in Piazza or found on project pages that are part of the Course Wiki.

Additionally, for any policies which are not clear in this video, more information will be posted or linked to in Piazza.

 

 

 

 

转载于:https://www.cnblogs.com/ecoflex/p/10888301.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值