mikeage.net Logo
mikeage.net/tag/c/page/2/

mikeage.net @ כ"ב תמוז תשס"ח

Posts Tagged ‘C’

i++ Incremements and Execution Sequence

ט"ז תשרי תשס"ז - October 7, 2006

Quiz:

What will the following code print?

int i = 5;
printf("%d ", i++ * i++);
printf("%d\n", i);

(more...)

Multiple Pointer Declarations

ט"ו תשרי תשס"ז - October 6, 2006

Quick quiz:

What does the following code do:

char* p1, p2

?
(more...)

Creating an array of strings for an enum

י"ב תשרי תשס"ז - October 3, 2006

A common issue in writing C based test tools is the desire to be able to show a user a list of all enums. This, of course, is technically impossible, as the mapping from enum to int is one way only. However, the following trick lets you create a two dimensional character array who's index is the enum (cast to int, to be pedantic) is an index to a string containing the name of the enum.
(more...)

New Section: C Stuff

ט' תשרי תשס"ז - September 30, 2006

I've been collecting nifty tricks and useful factoids about C, and I think I'll start posting them here.

Look for the first post sometime on Tuesday, with 3-4 posts weekly after that!

Quick Map
Content +
Personal +
Archives +
Site Stuff +
RBS Weather +
Search +
New Images
Visitors
Clustermap
Blogroll

Valid XHTML 1.1!
Printer Friendly Page
 

Last Modified: September 04, 2006 @ 09:11 CST