No, no. What do you mean by I am taking this from Wikipedia? Of course not, why are you accusing me?
Ok, moving on.
C data types is the kind of data that you use for a variable. Variable here is a name for a thing. To make this thing not-quite-wide in terms of ‘what is this’, we use data types to converge this wideness.
There is basic data types, and advanced data types.
Basic data types
char is basically a character. That’s it. One single character.
int is short for integer. int is VERY WIDELY used for data types, due to its very simple name and people is very lazy to do other variable as a number. Yeah, this is widely used for number, what do you expect from an integer? int can hold from -2^32 ~ 2^32-1 , any number around that, is okay. More or less than that, is not okay.
Basically an integer but shorter. As the name says. short is just useless unless you have a fucking DOS computer with vibrating floppy disk and 1 GHz processor.
Oh you need a number more than 2^32? Don’t worry, we have ‘long’ here. long is used when int doesn’t satisfy you. long is a long version of int.
OH YOU STILL NEED BIGGER NUMBER THAN LONG HAS? Well, I introduce you, ‘long long’, the tall old cousin that holds very fucking huge-ass number, from −9,223,372,036,854,775,807 to +9,223,372,036,854,775,807. COUGH COUGH sorry I have an allergic to indistinguishable numbers.
What would you do if you want to make a number that is not round? I mean, say you want a 2.5. How the hell do you do that? Introducing, float, now without coca-cola, ice cream on top, ice, cup, basically not a drink. float is used when you need
Every number data type you just read, can be modified with special word.
Unsigned <the number data types> is basically the same size with yout normal number data types, BUTT take every possible number on the negative side, move it in front of the maximum number, so you now have DOUBLE (2x) the normal data type. For example:
unsigned long long oohohohohohoho this is so huge like my.. nvm
Normal long long: −9,223,372,036,854,775,807 to +9,223,372,036,854,775,807
Unsigned long long: 0 to +18,446,744,073,709,551,614. WOOOOOW
Now that’s it for now. Don’t wait for me to post another thing again. I have an exam 😦
Really? You ask me how to program with C? lol you must be joking.
But on a serious note, I can do some C stuffs, and I can teach you the basic of C programming.
So what the heck is programming?
Programming is something that you do to make a program that solves… things.
No, really, in this kind of method (my method, lol), you only C programming (hehe) as something that do some counting shit. The more advance using of programming, idk how that’s my job to learn it in the future.
Okay then, programming is making a program, so how do you start?
The most basic program you can use is C. And C and its derivative are the fundamental thing on programming. But with my way, we will use it for solving numbers… stuff.
The first thing you need to do is install the IDE.
“THE HECK IS IDE” Well, IDE stands for Integrated Development Environment, which is basically something that helps you to program, from writing, checking, executing, and more. The IDE you can use for my tutorial is DevC++ or Code::Blocks. I personally use Code::Blocks because there is an autocomplete feature that helps you when you’re too lazy to write. I am lazy too don’t worry.
For DevC++ idk too much lol I am gonna teach you only from codeblocks. But don’t worry programming with DevC++ is pretty much the same if you ask me.
First thing first, look at the top right.
See that picture of page with plus? yea that means ‘New’, I am gonna slap you if you didn’t get this. The right of it is load, one more right is save. Didn’t you understand Microsoft Word?
Click that page thing button. After that you see this menu. Click on the project. Don’t worry, I also didn’t know why the other thing is there also. Why project, you may ask. Because if it is not project, you can’t check it, you can’t debug it, and you can’t compile it. THERE IS NOT EVEN AN AUTOCOMPLETE 😦 so yeah I suggest you to do this.
WTF is this, Wraith?? This is uhhhhhhh menu that choose what kind of application you want to make. For this tutorial, Just click Console Application, and you’re good to ‘go’. (See the top right of the picture)
TO BE NOTED, DO NOT use Space character on your program’s name. There is something not good behind it so for your own sake don’t do it.
Then press next, and then next blah blah blah. You’re done! Wait a bit.
The Windows icon- I mean, the CodeBlocks icon, if the word beside it is BOLD, it means that that project is an active project, that you will build, run and bla bla bla.
Click sources twice, then click on the main.c twice also, and then…
No, just kidding. You’re not a coder. That code you see is a template for any main.c file for a new project.
Now press F9.
F9 basically a shortcut for ‘Build & Run’. Or I would say, ‘TEST MY PROGRAM NOW’.
Or if you want some conventional clicking, below the dropdown menu, there is a button with GEARS and PLAY icon, beside the blue recycle icon. That’s the button for build and run. Go explore other things inside codeblocks, maybe you’ll find something useful.
just go i am your dad
So that’s all the basic thing for introduction for C programming. Next up we CODE, real CODE. cya
I just want to make things clear
I don’t want to go any near
It just makes me rip my tear
I’m scared to speak
But please don’t leak
It makes me scared to peek
“You should change your mind”
“Just do an U-turn across the line”
How the fuck would I replace my brain
If everything comes and bind?!
Mungkin aku harus belajar menghargai orang lain. Dengan menunjukkannya. Dengar, aku menghargai karya apapun yang muncul dari orang-orang, namun untuk bisa menunjukkannya, Anda harus menanyakannya secara pribadi. Aku tidak bisa menunjukkan penghargaanku atas karyamu jika kamu bertanya sekali pada seluruh khayalak di muka bumi ini secara bersama-sama. Aku akan merasa, akan ada orang yang menjawabnya dan akan lebih baik penilaiannya daripadaku.