Challenge 11

Description

The purpose of this challenge is to manually manipulate character arrays. This challenge converts a Spanish word to the diminutive version.

Requirements

  1. Write a function to determine the diminutive form of a word in Spanish. Call it void smallify(char before[], char after[]). If a word in Spanish ends in –co or –ca, the diminutive form of the word takes the first part of the word, converts the ‘c’ to ‘quit’ and completes the word with the suffix of the original word. DO NOT cout after IN THIS FUNCTION. The after array represents the diminutive form. The before array represents the original word.
  2. Declare a char array to hold a maximum of 50 characters to receive the user input.
  3. f the before word does not end in –co or –ca, then simply copy before to after with no changes.
    For example:
    taco becomes taquito (ta-co becomes ta-quit-o)
    flaca becomes flaquita (fla-ca becomes fla-quit-a)
    flores becomes flores (flores becomes flores)
  4. Ensure that your after array allows for more characters than your before array.

Sample Interaction / Output

Enter a string: flaca
flaca becomes flaquita

Enter a string: taco
taco becomes taquito

LEGEND
PROGRAM OUTPUT
USER INPUT
FROM INPUT

CATALOG ID: CPP-CHAL0011

Print Requirements