In this main function we can call the function that we made it into next section.
testprint (); and bintang (); are the function call, it is separate by new line (\n, escape sequence).
Next, left click on Project1 again make new file and add your function description in this section. Save it in the extention .c (eg.: tes.c). You can add more than one function description in this section and call in to main function in myTest.c.
In this section there are two function description it is void testprint() it will display "Hallo World" with two new line. The second function it is void bintang() it will display the riferse of triangle that has 4 rows and 4 columns. Don't forget to include the general library of C Language it is stdio.h the abbreviaton of standart input output and .h the extention of header file library. You can add more function in this section.
The last section is make the header file of this project. Left click on Project1 and make new file write the syntax of header file and save it into .h extention (eg.: tes.h). In this section there are containt the function prototype.
void testprint (); and void bintang (); are the function prototype of their function call and function description on the section above.
The result of this project is
I hope you understand and dont forget to try it.
For more informataion contact me at: chrifto@yahoo.co.id or chrifto@gmail.com
Practice Make Perfect ^_^
by: Chrifto M Sepang
Fear the Lord is the Beginning of Knowledge
Tidak ada komentar:
Posting Komentar