19 lines
867 B
C
19 lines
867 B
C
/// @file
|
|
/// @brief Task1: "single-file" executable C program
|
|
|
|
/// @todo Include C standard library headers as needed
|
|
|
|
/// @todo Implement a function 'count_spaces' according to the description below:
|
|
/// The function
|
|
/// - receives an pointer to a null-terminated charcater string,
|
|
/// - uses the function 'isspace' from <ctype.h> to count the number of spaces, and
|
|
/// - returns the result as an unsigned integer value
|
|
|
|
/// @todo Implement a 'main' function conducting the following tasks in this order:
|
|
/// - construct two local variables containing the following null-terminated string literals:
|
|
/// "How many spaces does this string contain?"
|
|
/// " How about this\n multiline string? "
|
|
/// - use your function 'count_spaces' to count the number of spaces in each of the string literals
|
|
/// - print both results to the console
|
|
int main() { return 0; }
|