Question: Use a Unix/Linux environment develop and test a C/C++ program that accepts one argument which is supposed to be a URL, analyzes the input argument

Use a Unix/Linux environment develop and test a C/C++ program that accepts one argument which is supposed to be a URL, analyzes the input argument and prints its components on the terminal.

For example, if the input was the string

then the output should look like the followings:

Protocol: https

Domain: adsadas.edu

Port: 80

File path: /directory/faculty/people.html

Parameters: name=Robert

the program should print out an error message that would help the user to locate the errors, e.g.

Invalid URL with following erroneous components:

Protocol: hpptz is not a valid protocol.

Port: port number must be between 1 and 65535

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!