Write a segment of c code that will determine the numerical


Write a segment of C++ code that will determine the numerical value of acharcontaining a digit in the range '0' ... '9' to an integer with the appropriate value. That is, ifchhas the value '3', the value3will be assigned to anintvariable. You may assume the value ofchis a digit in the range '0' ... '9' .

Write a segment of C++ code that will determine the numerical value of astringcontaining a 2-digit integer. That is, ifstring shas the value "42", the value42will be assigned to anintvariable. You may assume the value ofsis a 2-digit in the range '00' ... '99' .

Write a segment of C++ code that will extract the domain name from a URL. For instance, given the URLhttps://www.cs.drexel.edu/~mcs171/Sp13/index.html, the domain namewww.cs.drexel.eduand file nameindex.htmlshould be assigned to separate string variables.

You may assume the URL begins with "https://" and there is a file name at the end of it (not simply a '/' or any query info, e.g., "?name=stinkerlips")

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a segment of c code that will determine the numerical
Reference No:- TGS01389530

Now Priced at $30 (50% Discount)

Recommended (98%)

Rated (4.3/5)