Skip to content

Commit 171d2c7

Browse files
authored
Add files via upload
1 parent 746c5f1 commit 171d2c7

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Diff for: command_line_arg.c

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include<stdio.h>
2+
3+
void main(int args , char*argv[])
4+
{
5+
printf("Program name is: %s\n",argv[0]);
6+
if(argv<2)
7+
{
8+
printf("No argument passed through command line. \n");
9+
}
10+
else{
11+
printf("First argument is: %s \n",argv[1];)
12+
}
13+
}

Diff for: gets_puts.c

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include<stdio.h>
2+
#include<string.h>
3+
4+
void main()
5+
{
6+
char name[50];
7+
printf("Enter your name:");
8+
gets(name);
9+
printf("Your name is:");
10+
puts(name);
11+
}

0 commit comments

Comments
 (0)