The task for this month’s Exercise was to create code that outputs an inverse number pyramid.
Here’s what such a thing looks like:
0000000000
999999999
88888888
7777777
666666
55555
4444
333
22
1
The task for this month’s Exercise was to create code that outputs an inverse number pyramid.
Here’s what such a thing looks like:
0000000000
999999999
88888888
7777777
666666
55555
4444
333
22
1
As you sit and madly pound out code, variable names are probably not at the top of your list of things to do better. I tend to use x for my loops, c or ch for characters, and other variables, including a, b, and c. This is an acceptable approach, but for larger programs such variable names not doing you any favors.
Continue reading
Two things that seem to be difficult for a beginning C programmer are numbers and their formatted presentation. I admit: These things are difficult to understand. Therefore some practice is in order.
Continue reading
Structures aren’t really scary. Pointers are scary. Obviously, a good way to make structures more terrifying it so throw some pointers at them.
Continue reading
A structure is capable of containing any other type of C language variable. That includes other structures.
Continue reading
In the C language, struct is a variable type, but do you declare a structure or define a structure? That one has me perplexed.
Continue reading
Some programmers find it charming that C can be so frustratingly obscure. In fact, a lot of the language’s perplexing nature is simply a reflection of its efficiency.
Continue reading
Often times the problems you’ll encounter in C involve interface with something else. You’ll need to code directions for an operating system or interact with data that already exists or is output from some function. In this month’s exercise, you get to test-run those skills.
Continue reading
How do you search for one string within another string? Brute force! That means, you size up each character one at a time until you find the perfect match.
Continue reading
It’s straightforward to use the strstr() and related C library searching functions to locate a string in a pile of text. To locate the next occurrence of that string takes a bit more work.
Continue reading