Program Design

I'm working on a c programming project and need a sample draft to help me learn.

Write a program to check if an email address read from a file is a UCLA email, an email that contains ucla.edu. The output file should contain all the UCLA email addresses read from the input file. You can assume email addresses in the file are valid email addresses.

Example input/output:

Enter input file:

emails1.txt

Output:

output file name is UCLA_emails1.txt

Technical requirements:

1. Name your program UCLA_emails.c

2. Prompt the user to enter a file name for the input file.

3. The output file name should be the same name but with an added prefix of

UCLA_. For example, if the input file name is emails.txt, the output file name

should be UCLA_emails.txt.

4. Assume the input file name is no more than 100 characters.

5. Read the emails from the file. Email addresses are stored in separate lines.

6. Assume length of email addresses is no more than 2000 characters.

7. The program should include the following function:

int is_UCLA_email(char *email);

The function expects email to point to a string containing an email address. The

function returns 1 if email address contains ucla.edu, and returns 0 otherwise. String

library functions are allowed.

8. In the main function, call is_UCLA_email function and write the email address to the

output file if it is an UCLA email.

##

#. The program should begin with a comment that briefly summarizes what it does.

#. In most cases, a function should have a brief comment above its definition

describing what it does. Other than that, comments should be written only needed

in order for a reader to understand what is happening.

#. Information to include in the comment for a function: name of the function, purpose of

the function, meaning of each parameter, description of return value (if any), description

of side effects (if any, such as modifying external variables)

#. Variable names and function names should be sufficiently descriptive that a

knowledgeable reader can easily understand what the variable means and what the

function does. If this is not possible, comments should be added to make the meaning

Clear.

#. Use consistent indentation to emphasize block structure.

#. Full line comments inside function bodies should conform to the indentation of the code

where they appear.

#. Macro definitions (#define) should be used for defining symbolic names for numeric

constants. For example: #define PI 3.141592

#. Use names of moderate length for variables. Most names should be between

2 and 12 letters long.

#. Use underscores to make compound names easier to read:

tot_vol or total_volumn is clearer than totalvolumn

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more