home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap09 / hello.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-06  |  403 b   |  16 lines

  1. /* hello.c  --  legal ways to initialize strings as */
  2. /*              arrays of char values               */
  3.  
  4. char Gphrase[] = { 
  5.     'H','e','l','l','o','\n','\0' };    /* global initialization */
  6.  
  7. main()
  8. {
  9.     static char gphrase[] = {
  10.         'h','e','l','l','o','\n','\0' };    /* local initialization */
  11.  
  12.     printf("Global: %s\n", Gphrase);
  13.     printf("Local:  %s\n", gphrase);
  14.  
  15. }
  16.