Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7d34d3f

Browse files
solve 1st problem of string in C
1 parent a8e738c commit 7d34d3f

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

‎a.out‎

15.6 KB
Binary file not shown.

‎solve_problem.c‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,29 @@
22
// to sore details of user & print all characters using a loop
33

44
#include <stdio.h>
5+
void string(char arr[]);
56
int main(){
67
char firstName [] = "coder";
78
char lastName [] = "Boy";
9+
string(firstName); // function call
10+
string(lastName); // last name
811
return 0;
912
}
13+
// function Definition
14+
void string(char arr[]){
15+
for (int i = 0; arr[i] != '0円'; i++)
16+
{
17+
printf("%c" , arr[i]);
18+
}
19+
printf("\n");
20+
21+
}
22+
23+
1024

1125

1226
// #include <stdio.h>
1327
// int main(){
1428
// return 0;
15-
// }
29+
// }
30+
// 1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣ 8️⃣ 9️⃣ 🔟

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /