Characters and Strings A character is a single letter, symbol, or number (from -128 to +127). The value of the character is stored in one byte of memory, so it must be very small. A string, however, can be any length of letters, words, or symbols, like a name or a sentence. Let’s learn how to handle […]
Tag Archives: C
Programming in C: Short and Long Variables
Short and Long Integers, Double and Long Double Floating Points C provides special integer and floating point variables to handle short and long numbers. How you use these depends on how your computer’s memory stores information. Short and Long Integers When declaring an integer, you can use one of three variable types: Type int […]
Programming in C: Floating Point Variables
Floating Point Variables, Working with Money, Viewer Input with Float, Constants Now that we understand integer varialbes, let’s learn about another type of number: the floating point. Floating Point Variables A floating point variable is a number with a decimal point value, like 5.34 or -345.98.
Programming in C: Working With Variables
Declaring Variables, Integers, Working with Viewer Input, and Arithmetic Operators A variable stores information. In C, we use different types of variables to store different types of information, such as numbers, letters, or words. The variable holds the information until you are ready to use it. Declaring (Initializing) Variables Whenever you use a variable in a […]
Programming in C: Escape Characters and Tabs
There is a set of special characters, called escape characters, which add special things to your printf statements. Escape characters begin with a backslash: \ and are followed by a letter or symbol, such as: newline character: \n tab indent: \t beep sound: \a
Programming in C: Directives and Functions
When you write a C program in an editor (such as vi on Unix or Notepad on Windows), you are creating a source code. Every C source code has these parts: preprocessor directives main function body functions Let’s learn what each of these means and how they work.
Starting Off Programming in C
The following series of tutorials are designed for people with little or no computer programming knowledge. They only require a basic understanding of either Windows or Unix and you must have a C compiler with an IDE, or you must understand how to use a plain text editor, such as vi (in Unix) or Notepad […]