aboutsummaryrefslogtreecommitdiff
path: root/exam_final/subjects/13-0-infin_add/subject.en.txt
blob: a531aa14a90fbd77fde8b4805b0ffa4ae56e785a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Assignment name  : infin_add
Expected files   : *.c, *.h
Allowed functions: write, malloc, free
--------------------------------------------------------------------------------

Write a program that takes as a parameter two strings that represent two
numbers potentially infinit, and displays on stdout the result of the addition
of these two numbers, followed by a '\n'.

A negative number will always be prefixed by one and only one -. The only
characters that can be part of the strings are digits and the sign -.

Both parameters will always be well formated, and you will always have
exactly two parameters, no tricks.

Example:

$> ./infin_add "879879087" "67548976597" | cat -e
68428855684$
$> ./infin_add "-876435" "987143265" | cat -e
986266830$
$> ./infin_add "-807965" "-34532"
-842497
$>