Skip to content

Commit ad720ae

Browse files
committed
Added video 9 source file
1 parent de3b07b commit ad720ae

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

C_Begineer/09-CBegineer.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include <stdio.h>
2+
#include <stdlib.h>
3+
#include <string.h>
4+
5+
int main() {
6+
7+
char name[14] = "Bucky Roberts";
8+
printf("My name is %s \n", name);
9+
10+
//changin 3rd element [Array index start from 0]
11+
name[2] = 'z';
12+
printf("My name is %s \n", name);
13+
14+
char food[] = "tuna";
15+
printf("The best food is %s \n", food);
16+
17+
//changing value of food by copying new value usinf strcpy function
18+
strcpy(food, "bacon");
19+
printf("The best food is %s \n", food);
20+
21+
return 0;
22+
}

0 commit comments

Comments
 (0)