Skip to main content

Brief Notes C Language: Instructions

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

[Instructions]
In C language, as well as in any other programming language, there are some types of instruction.
Assignment
Assignment instruction is used to, as its name, assign a value into a variable. This can be done these operation:

The thing is, this assignment "can not" be done if information-name has a type of string / array of characters.

Conditional State
The conditional instruction is useful if there is particular state that has to be done differently from any others state.


Repeating
We can use this when we need to repeat something over and over again until it reaches the stop conditions.


Branching
With branching, we can jump from one 'job' into another 'job'. It can be done like these:

Note:
Continue can only be used inside do, for, and while iteration;
Break can only exists inside iteration or switch. This statement causes the iteration / switch be stopped.
The for goto must be placed in

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

Violin Diary #1: Tanah Airku

This is my first time ever to record me playing the violin. I've been learning to play a violin for about 5-6 months by self-taught. It's pretty hard, but for me it's less hard than to play a guitar. It's not purrfect, in fact there are a lot of mistakes here and there, but I never give up, and I'll never give in. The song I play is called Tanah Airku which is one of Indonesian national song. It's beautiful if it's being played nicely. If you find that it's not beautiful enough, perhaps it's me that can't play it properly yet, for that I say sorry. hihihi...

My Blog's Template (Is it beautiful enough?)

Choosing template for our blog is a little bit difficult because we need to make sure it has a nice structure, easily used and perhaps fit in our style or our soul or our wish. Some blogs I found have sooo good in arranging their view so that I can easily browse its contents and also have an eye catching style which makes my eyes keep open. But some blogs also have (if I can say) terrible design which I won't be able to see it twice. It has a lot of ads here and there, it has awful structures like: "I don't know where to begin with" and "I don't know what function is this button for" or "it has bad color choosing", it has so many pictures and some gifs and our cursor is changed into something gross, and so on. Choosing template or theme or our blog's design no needs to be very beautiful (even I don't say that mine is), but at least it has a 'good' design that allows reader to read it easily. I've tried to create template...