please dont rip this site

Language Ccpp Cref Contrib Snip Cmdline.c

/ *
**  CMDLINE.C - Demonstrates accessing command line arguments
*/

#include <stdio.h>

#define plural_text(n) &"s"[(1 == (n))]
#define plural_text2(n) &"es"[(1 == (n)) << 1]

main(int argc, char *argv[])
{
      int i, n = argc - 1;

      printf("You passed %d argument%s on the command line.",
            n, plural_text(n));

      if (argc > 1)
      {
            puts(" They are:");
            for (i = 1; i < argc; ++i)
            {
                  printf("\nArgument #%d:\n  Text: \"%s\"\n  Value: %d\n",
                        i, argv[i], atoi(argv[i]));
            }
      }
      else  putchar('\n');
      return 0;
}


file: /Techref/language/ccpp/cref/CONTRIB/SNIP/cmdline.c, 0KB, , updated: 1995/1/13 02:42, local time: 2022/7/2 03:35,
TOP NEW HELP FIND: 
18.206.14.36:LOG IN

 ©2022 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.massmind.org/techref/language/ccpp/cref/CONTRIB/SNIP/cmdline.c"> language ccpp cref CONTRIB SNIP cmdline</A>

Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to www.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .