home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / c / other / learn / prtesc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-07  |  394 b   |  20 lines

  1. /* PRTESC.C: Prints escape characters \",\n, and \t. 
  2. */
  3.  
  4. #include <stdio.h>
  5. #include <string.h>
  6.  
  7. main()
  8. {
  9.    char b[80];
  10.    int i,j;
  11.  
  12.    strcpy( b, "and seven years ago\n" );
  13.    printf( "\"Four score\n" );
  14.    printf( b );
  15.    printf( "\tone tab\n\t\ttwo tabs\n\t\t\tthree tabs\n" );
  16.    i = sizeof( b );
  17.    j = strlen( b );
  18.    printf( "Size is %d\nLength is %d.\n", i, j );
  19. }
  20.