Yurttas/PL/IL/C/F-mar11/02/03/01/00/assign string 00.c

From ZCubes Wiki
Revision as of 15:48, 5 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="c" line start="1" enclose="div">/* Copyright(C) 1998 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. Permis...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1/*
 2   Copyright(C) 1998
 3   All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4
 5   Permission to use, copy, modify, and distribute this
 6   software and its documentation for EDUCATIONAL purposes
 7   and without fee is hereby granted provided that this
 8   copyright notice appears in all copies.
 9 
10   date   : January 1, 1998.
11   author : Salih Yurttas.
12
13   assign_string_00.c
14*/
15
16
17#include <string.h>
18
19extern char* get_string();
20
21extern void put_string(char*);
22
23extern void put_string_count(char*, int);
24
25int main(int argc, char *argv[]) {
26
27  char *a,
28       *b;
29
30  int k;
31
32  a = get_string();
33
34  put_string(a);
35
36  k = strlen(a);
37
38  put_string_count(a,
39                   k);
40
41  b = get_string();
42
43  put_string(b);
44
45  k = strlen(b);
46
47  put_string_count(b,
48                   k);
49
50  strcpy(a, b);
51
52  put_string(a);
53
54  k = strlen(a);
55
56  put_string_count(a,
57                   k);
58
59}