Bentuk dasar bahasa C secara umum :
- Praprosessor
- Prototipe Fungsi
- Variabel
- Fungsi
/* Bentuk Program C */ ß---- bentuk komentar
#include <stdio.h> ß--- praprosessor
float jumlah(float x, float y); ß--- prototipe fungsi
main() ß---- fungsi
{
int a = 6;
int b = 3; ß--- variabel
float c;
.
.
}
float jumlah(float x,float y); ß--- fungsi
Pada hakekatnya program C merupakan susunan dari beberapa fungsi. Program yang paling sederhana harus memiliki sebuah fungsi.
No comments:
Post a Comment