Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I know it will be hard to help me with this fully but if i can get help with how it should be typed out

I know it will be hard to help me with this fully but if i can get help with how it should be typed out using linux for each situation that would be greatly appreciated.

PLEASE READ THIS: The program is to be coded in C programming language and please use #include

image text in transcribed

test code is below:

image text in transcribed

Project 5, Program Design 1. (70 points) A fashion retailer has decided to provide discount codes to teachers and student:s during a promotional event. The first step is to verify the teacher/student status of people requesting discount code by their email addresses. They will check if the email addresses end with .edu and find the domain name if it does before further verification. Write a program to find the domain name of an email address if the domain name ends with edu. The program displays domain that ends with edu. If the input does not contain an email address that ends with .edu, the program should display a message that indicates it is not a valid email address for the discount code. Example input/output: Input: iennifer23@nyu.edu Output: nyu.edu Input: joeW19@mail.usf.edu Output: mail.usf.edu Input: io TacebooK Output: Not a valid email address or the discount code Your program should include the following function int find domain (char *sl, char *s2) The find_domain function expects sl topoint to a string containing the input for an email address as a string and stores the domain to the string pointed by s2. If the email address does not end with .edu, s2 should contain an empty string. An empty string is a valid string with no characters except the null character. The function returns 1 if the email addresses ends with .edu in the domain, and returns 0 otherwise 1) Name your program email address.c. Assume input is no longer than 1000 characters. Assume the input contains no more than one qualifying web address. 2) 3) The find_domain function should use pointer arithmetic (instead of array subscripting). In 4) To read a line of text, use the read line function (the pointer version) in the lecture notes. other words, eliminate the loop index variables and all use of the operator in the function. # try email is a Unix 3he11 script that will be used to test project 5. # To use the script, copy it into the same directory as your scource file # set execute permi 3 310n r the rile by 13suing the command : # chmod +x try-email # Compile your pr gran, pr ducing a.out as the executable # To run the script, type # ./try email # The user input from the script will n t be sh wn n the screen. # Compare the results from your program with the expected results on the te3t . echo' /a.out

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions