-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
36 lines (27 loc) · 664 Bytes
/
main.c
File metadata and controls
36 lines (27 loc) · 664 Bytes
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
33
34
35
36
/*
* main.c
*
* Created on: Dec 30, 2014
* Author: muneer
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "cstring.h"
int main()
{
printf("OK DONE\n");
t_cstring *s = cstring_create();
t_cstring *s2 = cstring_create();
cstring_add(s, "This is a fake message. ");
printf("The value is now : %s\n", s->value);
cstring_add(s2, "multiple text");
printf("String 2 : %s\n", s2->value);
cstring_add(s, "New value added. ");
printf("The value is now : %s\n", s->value);
cstring_add(s, "Another message in same line");
printf("The value is now : %s\n", s->value);
cstring_delete(s);
cstring_delete(s2);
return 0;
}