home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_04 / 8n04051a < prev    next >
Text File  |  1990-03-20  |  573b  |  27 lines

  1. *****Listing 1***** 
  2.  
  3. #include <stdio.h>
  4.  
  5. main()
  6.     {
  7.     char real_array[20];
  8.     printf("Realarray can hold %d chars.", sizeof(real_array));
  9.     getarray(real_array);
  10.     }
  11.  
  12. void getarray(passed_array)
  13. char passed_array[];
  14.     {
  15.     printf("\nPassedarray can hold %d chars.", 
  16.        sizeof(passed_array));
  17.     }
  18.  
  19. ---------------------------------------------------------------
  20. Results : (under Power C and Instant C)
  21.  
  22. Realarray can hold 20 chars.
  23. Passedarray can hold 2 chars.
  24.  
  25. ---------------------------------------------------------------
  26.  
  27.