ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 06 Jun 2017 My Price 9.00

Write a program to extract Web addresses

Program homework on strings in c and command line arguments

 

1. (60 points) Write a program to extract Web addresses starting withwww.and ending with.edu. The program displays Webaddress contained in the input entered by the user. If the input does not contain a web address that starts withwww.and endswith.edu, the program should display a message that indicates such a web address cannot be found.Input: http://www.usf.edu/admissionOutput: www.usf.eduInput:https://www.facebook.com/Output: Web address starting with www. and ending with .edunot foundYour program should include the following function:void extract(char *s1, char *s2);The function expectss1to point to a string containing the input as a string andstoresthe output to the string pointed bys2.1) Name your programextract.c.2) Assume input is no longer than 1000 characters. Assume the input contains nomore than one qualifying web address.3) Theextractfuncton should use poin±er ari±hmetc (ins±ead of array subscriptng). In o±her words, elimina±e ±he loop indexvariables and all use of ±he [] opera±or in ±he functon.4) To read a line of text, use theread_linefunction (the pointer version) in the lecture notes.2. (40 points) Write a program that finds either the largest or smallest of theten numbers as command-line arguments. With –l forlargest and –s for smallest number, if the user enters an invalid option, the program should display an error message.Example runs ofthe program:./find_largest_smallest –l 5 2 92 424 53 42 8 12 23 41output: The largest number is 424./find_largest_smallest –s 5 2 92 424 53 42 8 12 23 41output: The smallest number is 2.1) Name your program numbers.c.2) Useatoifunction in<stdlib.h>to convert a string to integer form..3) Generate the executable asfind_largest_smallest.gcc –Wall –o find_largest_smallest numbers.c

Attachments:

Answers

(11)
Status NEW Posted 06 Jun 2017 05:06 AM My Price 9.00

-----------

Attachments

file 1496725738-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)