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

Derita Laptop Ganti: Sahabat Lama Menjadi Asing Bagiku

Sekitar satu tahun yang lalu, aku dan kakakku Mba Lala , tukeran laptop karena ada sedikit masalah dengan OS laptop mba lala, jadi aku memutuskan untuk membawanya buat dibenerin di comlabs aja. Satu tahun berlalu, hari demi hari aku lalui bersama laptop mba lala itu. Susah dan duka (susah dan duka ?) aku lalui bersama laptop toshiba hitam berkulit berudu. Ada kalanya seneng, ada kalanya juga engga. Ada kalanya dia responsif, tapi ada kalanya juga bebel ngambek engga nurut gerakan jari jemari yang bikin hati kesel. Tapi lebih dari itu, tanpa terasa ikatan batin antara aku dan laptop yang engga bisa aktifin bluetooth itu terjalin begitu kuat. Aku seolah tahu dimana letak file movie hanya mengklik ini dan itu dengan mata terpejam bahkan sambil tidur dan mimpi lelap. Aku sudah terbiasa dengan tata letak, environment, dan workspace yang terbangun didalamnya. Dan yang paling penting, laptop tipe satelite itu telah membantuku dalam menyelesaikan berbagai badai tubes dan tucil, membantuku di...

Visiting Animals with My Family

Big day, big day, big day.... /XD Yup, this is a very big day, for me. Why? Because, my parents, and my brother, are coming. I'm pretty excited, but also nervous. You know how it feels when you have a very messy room, and you got your parents are coming? Or you don't know what to do with your family as you have a tiny sized room? Arrhg /shock, it's complicated. But very exciting too. X-D First time of our journey, we were arriving at Sabuga. One of the lovely building style in here (ITB) is the classical stone that covers almost in all the part of the building... Oho, what is this? :P I was not using a professional camera, and I'm not a photographer too, so I couldn't make a good one. hehe. Bye the way, this is under the ground pipe.. Some places in ITB are unique (people said that), and one of them are 'echo point'. This place, if you speak up loud enough, will be able to spread out into all around of ITB and everyone's gonna...

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...