No Description

Ho Jun Yi 4db75e748d Done 1 year ago
include 8c2f5a2fae exercise with test 2 years ago
src 4db75e748d Done 1 year ago
test 8c2f5a2fae exercise with test 2 years ago
.drone.yml 8c2f5a2fae exercise with test 2 years ago
.gitignore 8c2f5a2fae exercise with test 2 years ago
LICENSE a055824868 Initial commit 2 years ago
Makefile 8c2f5a2fae exercise with test 2 years ago
README.md 4d03d6bbdb Update 'README.md' 2 years ago
test_all 4db75e748d Done 1 year ago

README.md

Sum input line

Exercise 10

In file src/sum_line.c write the body of the sum_line() function which returns the sum of two integers in the C-string input_line. input_line is a string containing two integers separated by one or more spaces.

Assume that the string contains two integers separated only by whitespace. There may also be spaces before the first integer and/or after the last, but there won’t be any other characters in the string.

For example, get_sum(» 123 5 «) should return the integer 128, and get_sum(«-14 30») should return the integer 16.

Hint: use strtol().