Skip to main content

Brief Notes C Language: Term and Program Structure

 This is just my note when I attended the lecture. I write this here so it will be long lasting.  :D

[ The Terms in C ]
There are several terms used in C:
Block is a set of expression written between '{' and '}' mark;
Definition tells the property(ies) of an object and allocate the object's memory as well;
Declaration tells the property(ies) of an object especially related to type;
Initialization gives the initial value to the object;
Global Declaration is the declaration which is valid in one unit translation (file);
Local Declaration is the declaration which is only valid in one block this declaration placed;
Object also known as a variable;
Lvalue is an expression that refers to an object. Easily, lvalue is the left value of an assignment expression;
Body is the realization of a function;
Scope is a program's area where name is known.

[ Program's Structure ]
Below is the structure of a main program written in C:



Actually there is no such a strict role in the matter of character's position.
For more clear example, it will be written here in my next post as I will keep posting about C. :D
Thank you for coming.
Leave a comment, if you want to. :D

Comments

Popular posts from this blog

Korps Dai Mahasiswa (KDM) Salman ITB

Dai Corps Students, or shortened to KDM Salman ITB , is a recitation of activities held at Salman Mosque and intended for ITB students and also public. Located in the South Corridor Salman Mosque, KDM Salman ITB is trying to bring teaching activities with the concept of traditional pesantren (traditional boarding school). With meetings every day after dhuhur, the students who take part in this Salman KDM get the study material by using the yellow books (kitab kuning) as a handle, as in the traditional pesantren. Teachers who bring the study also vary depending on the items of its study, they are ustadzs from Salman mosque itself. KDM Salman ITB appears to address concerns some students, as well as some ustadzs in mosques Salman, who feel that it is necessary to foster student containers in religious matters. It is motivated by the proliferation of such activities 'mentoring' on campus. But the mentor who brought the material (ie students) were deemed less or even not ...

Ramadhan 1435H & Silaturahmi keluarga

Baju baru alhamdulillah, tuk dipakai di hari raya, Tak punya pun tak apa-apa, masih ada baju yang lama. Sepatu baru alhamdulillah, tuk dipakai di hari raya, Tak punya pun tak apa-apa, masih ada sepatu yang lama. Kue baru alhamdulillah, tuk dimakan di hari raya, Tak punya pun tak apa-apa, masih ada kue yang lama. /wahaha Alhamdulillah, tidak terasa ramadhan telah berlalu. Rasa syukur ku kepada Allah SWT. karena telah diberi kesempatan untuk bisa bertemu ramadhan tahun ini sampai selesai. Meskipun Ramadhan udah selesai, semoga hati dan jiwa tetap fitri dan selalu terjaga. Ramadhan kali ini sangat menyenangkan meskipun setengahnya aku jalanin tanpa keluarga, tanpa sanak saudara yang menemani jerih payah puasa. /sweat Tapi ngga papa, yang penting inti dari ibadah bulan ramadhan tetep didapat. #intinya apa ya? Seperti ramadhan-ramadhan sebelumnya, setiap satu minggu sebelum lebaran ibu (dan aku) pasti bikin kue-kue penghias meja. Kali ini pun sama. Aksi bikin kue pun terjadi...

[Arduino Project -- 5] -- Using Keypad and LCD Screen at Once to make simple Calculator

Good day. This is my fifth times of my post about Arduino. We've learned about how to create something using Arduino from the very beginning that was just make a simple push button, till we made something more difficult which was creating a temperature censor and displaying the result in the LCD screen. And now, i'm gonna show you how to use a keypad and LCD Screen at once. With these two devices are combined with our Arduino, we are able to make something like a little application. And now, i'm gonna make a simple calculator using them. Stuffs: These are stuffs you are gonna need to prepare An Arduino Uno A BreadBoard Jumper Cables A Keypad A PC which has Arduino App Installed A Potensiometer A Resistor What do we do? First thing we gotta do is to wire our Arduino and keypad as shown below: Actually we dont need the speaker and the led. But I put them when i wired them. And here is my work: It was a little bit confusing i thought. And aft...