NTech

Menu
  • Home
  • Technology
    • Internet
    • Market
    • Stock
  • Downloads
    • Dvd
    • Games
    • Software
      • Office
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Uncategorized

Sunday, 16 August 2015

Command Line Argument C Program

By ntech23:31 No comments
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])   //  command line arguments
{
if(argc!=5)
{
   printf("Arguments passed through command line " \
          "not equal to 5");
   return 1;
}

   printf("\n Program name  : %s \n", argv[0]);
   printf("1st arg  : %s \n", argv[1]);
   printf("2nd arg  : %s \n", argv[2]);
   printf("3rd arg  : %s \n", argv[3]);
   printf("4th arg  : %s \n", argv[4]);
   printf("5th arg  : %s \n", argv[5]);

return 0;
getch();
}





Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Pages

  • Home

Popular Posts

Recent Posts

Text Widget

Pages

  • Home

Blog Archive

  • ►  2019 (2)
    • ►  May (1)
    • ►  April (1)
  • ►  2017 (7)
    • ►  July (1)
    • ►  April (3)
    • ►  March (3)
  • ►  2016 (50)
    • ►  October (1)
    • ►  September (4)
    • ►  July (2)
    • ►  June (6)
    • ►  April (2)
    • ►  March (5)
    • ►  February (28)
    • ►  January (2)
  • ▼  2015 (9)
    • ▼  August (9)
      • Command Line Argument C Program
      • C program to copy contents of one file to another ...
      • Google announces massive reorganization, becomes s...
      • Windows 10 vs. Windows 8.1 vs. Windows 7 Performance
      • Fingerprint scanners on Android phones are far les...
      • C program to Calculate Factorial of a Number Using...
      • FIND FACTORIAL OF A NUMBER USING RECURSION IN C PR...
      • Intel Core i7-6700K "Skylake" CPU Review
Powered by Blogger.

Text Widget

About Me

ntech
View my complete profile

Copyright © NTech | Powered by Blogger
Design by Flythemes | Blogger Theme by NewBloggerThemes.com