-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogram1.c
32 lines (25 loc) · 1.1 KB
/
program1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
https://powcoder.com
代写代考加微信 powcoder
Assignment Project Exam Help
Add WeChat powcoder
/*************************************************************************/
/* File Name : program1.c */
/* Purpose : this C-file tests the functions of the "my_string" library*/
/* */
/* */
/* Author(s) : tjf & you */
/*************************************************************************/
#include <stdio.h>
#include <string.h>
#include "my_string.h"
int main() {
// a string we will test with
char my_string [100] = "Tom" ;
// test of strlen() functions
printf ("Sample string: \"%s\" \n", my_string) ;
printf (" string's length: strlen() = %lu \n", strlen (my_string)) ;
printf (" string's length: my_strlen() = %lu \n", my_strlen (my_string)) ;
printf (" string's length: my_strlen2() = %lu \n", my_strlen2(my_string)) ;
/* CIT 593 students: TODO: add code to test your my_string.h functions */
return (0) ;
}