Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- cann



  Pointers, arrays, and string literals

A recently posted question on Stack Overflow highlighted a common misconception about the role of pointers and arrays held by many programmers learning C.The confusion stems from a misunderstanding concerning the role of pointers and strings in C. A pointer is an address in memory. It often points to an index in an array, such as in the function strtoupper in the following code:void strtoupper(char *str) { if (str) { // null ptr check, courtesy of Michael while (...

   char pointer,initialization,literal,cann     2011-09-22 13:29:23