Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description The purpose of this challenge is to manually manipulate character arrays. This challenge converts text into URL-safe text. Requirements Write a program to make

Description

The purpose of this challenge is to manually manipulate character arrays. This challenge converts text into URL-safe text.

Requirements

Write a program to make ensure that strings are URL-safe. For example, here is a URL, or website address:http://stackoverflow.com/questions/23553138/how-can-i-follow-oop-base-concepts-with-qobject-derived-class-instance The underlined text in the URL above is considered URL-safe

Create a function void make_safe(char safetext[], char rawtext[]). This function will:

Return the converted URL-safe string via the 1st parameter

Convert everything in rawtext to lowercase

Convert everything that is not a number or a letter into a dash: -

Will ensure that only one dash will represent a string of non-alphanumeric characters

Declare a char array to hold a maximum of 255 characters.

Ask the user to enter a string. Use cin.getline(rawtext, 255) function call to get the string from the user.

Show the URL-safe string

Sample Interaction / Output

Enter a string: Is 42 the meaning of life?!?! Yes or NO? Safe version: is-42-the-meaning-of-life-yes-or-no- 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Discuss various types of training methods.

Answered: 1 week ago

Question

Ty e2y Evaluate the integral dy

Answered: 1 week ago

Question

1. Discuss the potential legal issues that relate to training.

Answered: 1 week ago

Question

3. Design a program for preparing for cross-cultural assignments.

Answered: 1 week ago

Question

2. Develop a program for effectively managing diversity.

Answered: 1 week ago