ตัวอย่างการใช้สิทธิ 34 C
ชื่อเรื่อง: การปฏิบัติเรียกใช้ฟังก์ชัน
การวิเคราะห์โครงการ: ไม่มี
รหัสที่มา:
// Created by www.w3big.com on 15/11/9. // Copyright © 2015年 本教程. All rights reserved. // #include <stdio.h> void hello_world(void) { printf("Hello, world!\n"); } void three_hellos(void) { int counter; for (counter = 1; counter <= 3; counter++) hello_world();/*调用此函数*/ } int main(void) { three_hellos();/*调用此函数*/ }
เอาท์พุทตัวอย่างข้างต้นคือ
Hello, world! Hello, world! Hello, world!