Created
June 14, 2017 21:07
-
-
Save vijayanandrp/5e4d114927c10cd8ad15954d64bad8d2 to your computer and use it in GitHub Desktop.
Simple C Program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<conio.h> | |
int main(int argc, char *argv[]) | |
{ | |
if (argc < 2) | |
{ | |
printf("%s \n", "Pass your name as the argument"); | |
return 0; | |
} | |
else | |
{ | |
printf("Hello %s \n", argv[1]); | |
return 1; | |
} | |
} | |
/* | |
After long years now enjoying my C language :) | |
$ gcc cprogram.c -o cprogram | |
$ chmod u+x cprogram | |
$ ./cprogram "Vijay Anand" | |
$ Hello Vijay Anand | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment