Bradford Morgan White


Absurd Git   ·   Abort Retry Fail


Page 6 of 8

20150823   An Introduction to C, XIII   ⇢  

We've covered a lot of ground with C so far. The big problem here is that we've not yet covered one of the most common tasks on a UNIX system. We have not covered files. So, let's look at files. For file I/O in C, you need a file pointer. We declare a fi

20150705   An Introduction to C, XII   ⇢  

So, in this part of the C Intro, I would like to say a bit about memory management. VARIABLES In C, there are really only two ways that you can allocate memory. The first and most common way is by declaring a variable. The second way is to explicitly

20150610   An Introduction to C, XI   ⇢  

Some time has passed since I last did anything with my C tutorial. This is largely due to work and having several different projects going at any one time (learning Chinese, developing a hobby OS, a gaming community, etc...). However, I felt that I ought

20130122   An Introduction to C, X   ⇢  

It's time for a cake walk. Here's an array of integers. int values[10]; int i; for (i = 0;i < 10;i++) { values[i] = 2 * (i + 2); printf("The value at i %d is %d\n", i, values[i]); } That's it. Floats and other data types work p

20120910   An Introduction to C, IX   ⇢  

In the last post, I briefly introduced arrays and strings. Let's look a little more closely. #include #include int main(void) { char name1[5] = "Ford"; char name2[4] = "Jim"; char name3[8] = ""; if

20120830   An Introduction to C, VIII   ⇢  

So far, we have already covered the use of the character data type, but what happens when you want to print more than one character to screen? This was strings are for. A string is a series of characters terminated as with a null character. That is, a str

20120815   An Introduction to C, VII   ⇢  

So far, I have thrown a lot of information at you very quickly. Let's recap with completely useless programs. The character variable type uses 8 bits of memory (one byte). This type is declared with the 'char' keyword. While the character type is used to

20120728   An Introduction to C, VI   ⇢  

Now for something odd. a = (x > 3 ? 2 : 10); The above means: "if x is greater than 3 then a is equal to 2, otherwise a is equal to 10. Written in a form with which you are already familiar, the above is exactly equivalent to the following: if (x

20120710   An Introduction to C, V   ⇢  

As you might imagine, a large series of conditional statements could get really tedious. Imagine a series of 20 if statements... and imagine typing that out. Very quickly, it would become very annoying. For this reason, C has the switch-break. switch

20160705   An Introduction to C, IV   ⇢  

Programs are a lot more useful if users can interact with them. It is equally useful to be able to perform specific operations depending upon what input is gained from said users. That's the topic for this entry. There are several methods that can be used


1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
RSS


Tags: apple   bashblog   beingold   bitwarden   btrfs   centos   cloud   CPUs   dd   debian   docker   ewaste   find   history   hosted   hyperv   kde   kernel   letsencrypt   linux   llm   m1   mutt   mysql   news   OS   php   pockit   portainer   programming   review   riscv   rpi   scale   screen   slackware   tunnel   tutorial   vim   windows   wordpress   wpm  

© MMIX - MMXXVI, Bradford Morgan White
Licentiam Absurdum