C

View:  
Sorted by:  

Basics of Character Manipulation Functions for C Programming

At the heart of any string of text is the char variable. With C programming, it’s a unique cubby hole, into which you stuff a value from 0 through 255. That value is represented visually as a character [more…]

Basics of String Functions for C Programming

Despite its nonvariable type classification, the C programming library doesn’t skimp on functions that manipulate strings. Just about anything you desire to do with a string can be done by using some of [more…]

How to Format with printf() in C Programming

The most popular output function in C programming has to be printf(). It’s everyone’s favorite. It’s one of the first functions you learn in C. And as one of the most complex, it’s one of the functions [more…]

How to Use Stream Input in C Programming

The basic input/output functions in C are not interactive, which means that they don’t sit and wait for you to type text at the keyboard. That’s the way you expect to use a computer program: You type input [more…]

How to Conjure a Terminal Window in C Programming

Whether you’re using Windows, Mac OS X, Linux, or a Unix variant, you can still bring forth a terminal window with C programming, in which you can witness the awesome starkness of the command prompt. It’s [more…]

How to Use the main() Function Arguments in C Programming

Back in the old days, programs featured command-line options or switches. For example, to compile and link a C program, you would type something like this: [more…]

How to Quit One Program and Run Another in C Programming

In C programming, information can get into your program via command-line arguments. Information gets back out thanks to the return statement. That’s the primary way, but not the only way, a program bails [more…]

How to Make Static Variables in C Programming

In C programming, variables used within a function are local to that function: Their values are used and then discarded when the function is done. Don’t Give Me No [more…]

Basics of Global Variables in C Programming

Sometimes in C programming, a variable must be like cellular phone service: available everywhere. The variable also can be used by any function at any time. This type of variable could be called a [more…]

Basics of Binary for C Programming

Happily, you don’t have to program any digital device by writing low-level code, flipping switches, or soldering wires. That’s because today’s C programming happens at a higher level. But still, deep within [more…]

How to Use the Bitwise | Operator in C Programming

You’re already familiar with C programming’s decision-making logical operators: && for AND and || for OR. In the && evaluation, both items must be true for the statement to be evaluated as true; for the [more…]

How to Use the Bitwise & Operator in C Programming

Like the bitwise OR operator in C programming, the bitwise AND operator, &, also affects bits in a byte. Unlike OR, which sets bits, the AND operation masks bit values. It’s easier to show you a program [more…]

How to Use the Bitwise Exclusive OR (XOR) Operator in C Programming

XOR is the exclusive OR operator in C programming, yet another bitwise logical operator. And to answer your most pressing question, you pronounce XOR like “zor.” It’s the perfect evil name from bad science [more…]

How to Shift Binary Values in C Programming

The C programming language features two binary operators that perform the equivalent operation of “Everyone move one step to the left (or right).” The << and >> operators shift bits in value, marching [more…]

How to Use Hex with Binary for C Programming

Face it: No one, not even a C programmer, wants to count bits in a binary number. No one. Perhaps some nerd somewhere can tell you that 10110001 is really the value 177, but most programmers can’t. What [more…]

Basics of Variable Storage for C Programming

Digital storage is measured in bytes. Though displayed in the C programming language, all the information stored inside memory is simply a mass of data, bits piled upon bits, bytes upon bytes. It’s up [more…]

How to Check a Variable’s Location in C Programming

In C programming, a variable’s type and size are uncovered first by declaring that variable as a specific type, but also by using the sizeof keyword. The second description of a variable, its contents, [more…]

How to Work with Pointers in C Programming

The pointer’s power in C programming comes from both its split personality as well as from its ability to change values, such as a variable.

In More Pointer Fun, three char variables are declared at Line [more…]

C Programming: How to Work Pointer Math in an Array

What happens when you increment a pointer in C programming? Say that pointer variable dave references a variable at memory address 0x8000. If so, consider this statement: [more…]

How to Use Pointers and Strings in C Programming

The C programming language lacks a string variable, but it does have the char array, which is effectively the same thing. As an array, a string in C can be completely twisted, torqued, and abused by using [more…]

How to Build an Array of Pointers in C Programming

An array of pointers would be an array that holds memory locations. Such a construction is often necessary in the C programming language. Remember that an array of pointers is really an array of strings [more…]

C Programming: How to Use Pointers in Functions

A pointer is a type of variable. As such, it can easily be flung off to a function in C programming. Even more thrilling, a pointer can wander back from a function as a return value. Oftentimes, these [more…]

How to Free Memory in C Programming

It’s not as much of an issue as it was back in the microcomputer era, but wasting memory should still be a concern for any C programmer. Though you can brace yourself for 1,024 characters of input, odds [more…]

How to Free Memory with the malloc() Function in C Programming

Here’s a secret: Declaring a variable in C programming is in reality directing the program to beg for some storage space from the operating system. As you know [more…]

How to Work with Time in C Programming

Time functions and related matters in the C programming language are contained in the time.h header file. In this file, you find the goodies described in this list: [more…]

Listings:back...101-125126-145

Sign Up for RSS Feeds

Computers & Software
Great Gadget Giveaway -- Enter to Win!

Inside Dummies.com