#include "src.h" #include #include #include void c9(){ size_t lname_len = strlen(LAST_NAME); char *lower_last = malloc(lname_len); // Slightly faster way to memcpy for this purpose, might as well also copy // in the lowercased variant of the source const char *lname = LAST_NAME; char *d = lower_last; while (lname_len--) *d++ = tolower(*lname++); solve(9, "Converts string to lowercase", fmtstr("Original String: %s\nLowercased String: %s", LAST_NAME, lower_last)); } int main() { print_header(); c9(); return 0; }