Skip to content

YMont/Swap-Function_File-Separation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swap-Function_File-Separation

Purpose

該練習利用自定義swap函式,
並使用C語法,實作函式交換兩數字位置。

ex: a=3, b=5 --swap--> a=5, b=3

Complie

gcc -c main.c swap.c
.c generate .o

Output

gcc -o main main.o swap.o
.o generate .exe

Print

a is 5 , b is 4


練習1

自定義撰寫一個標頭檔swap.h

練習2

自定義撰寫一個swap功能在swap.c

練習3

於main.c上,呼叫swap(),並利用指標取址,達成兩數交換的功能

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages