> ~ Online tutorial


 Declarations
There is an important distinction between a string and a single character in C. The convention is that single characters are enclosed by single quotes e.g. * and have the type char. Strings, on the hand, are enclosed by double quotes e.g. "string..." and have the type "pointer to char" (char *) or array of char. Here are some declarations for strings which are given without immediate explanations.
/**********************************************************/
/*                                                        */
/* String Declaration                                     */
/*                                                        */
/**********************************************************/

#define SIZE    10

char *global_string1;
char  global_string2[SIZE];


main ()

{ char *auto_string;
  char  arraystr[SIZE];
  static char *stat_strng;
  static char statarraystr[SIZE];

}

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: