Find Jobs
Hire Freelancers

C Assignment

$10-30 CAD

Cancelled
Posted almost 10 years ago

$10-30 CAD

Paid on delivery
You are to write a program that: repeatedly requests the user to enter two sets of integers; calculates the difference between the two sets; prints the sets and the difference between them and a message indicating which set is larger. A sample run of this program is shown at the bottom of the page, your program should print output in the same format. Specific Requirements Your solution must contain and use the following functions: A function that reads a given number of integers from the keyboard into an array in dynamic memory and that returns a pointer to that array. The number of values to be read is given by the function's single integer parameter A function that calculates and returns the sum of the values in an integer array. The function should have parameters for the array and its size. A function that prints the contents of an integer array. The function should have parameters for the array and its size. Sample Run: Enter the number of values in the first set: 4 Enter 4 values 1 2 3 7 Enter the number of values in the second set: 3 Enter 3 values 1 2 3 set1 = {1,2,3,7} set2 = {1,2,3} set1 - set 2 = 7 The sum of set1 is larger Press q to quit, any other key to continue: y Enter the number of values in the first set: 5 Enter 5 values 5 4 6 3 1 Enter the number of values in the second set: 2 Enter 2 values 12 67 set1 = {5,4,6,3,1} set2 = {12,67} set1 - set 2 = -60 The sum of set2 is larger Press q to quit, any other key to continue: Enter the number of values in the first set: 3 Enter 3 values 4 5 6 Enter the number of values in the second set: 5 Enter 5 values 1 2 3 4 5 set1 = {4,5,6} set2 = {1,2,3,4,5} set1 - set 2 = 0 The sums of the sets are equal Press q to quit, any other key to continue: q
Project ID: 5925052

About the project

1 proposal
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
1 freelancer is bidding on average $20 CAD for this job
User Avatar
A proposal has not yet been provided
$20 CAD in 1 day
4.9 (45 reviews)
4.1
4.1

About the client

Flag of INDIA
Nasik (Nashik), India
0.0
0
Member since Mar 12, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.