Find Jobs
Hire Freelancers

Allocating an Array of Float.

max $5 USD

In Progress
Posted about 20 years ago

max $5 USD

Paid on delivery
5 prog. to do 1. allocating an Array of Float. 2. allocating an array of pointers. 3. constant and Non-Constant Pointers. 4. Constant funciton return value. 5. comma-Delimited file. ## Deliverables 1. allocating an array of float: write a funciton called makeArray that dynamically allocates n elements of an array of float, initializes all elements to 0, and and returns a pointerto the beginning of the array. here is the prototype: float * makeArray (unsigned n); 2. allocating an array of pointer: create an array of pointers to fString objects. read each line from an input text file, allocate an FString object to hold the line, and assign the object's address to a pointer in the array. for example an array of pointers could be declared as. const unsigned MaxRecs = 1000; FString * fileRecs[MaxRecs]; 3. Constant and Non-Constant Pointers: define a funciton with two pointer parameters. experiment with statements that call the funciton, passing it a combinations of pointer to constant and non-constant objects. find out which combinations are accpted by the compiler. in the function body, try modifying both the pointer parameters and the data they point to. demonstrate that you understand the difference between a const-qualified pointer and a pointer to a constant. 4. constant funciton return value: define a funciton that returns const float *. call the function and attempt to assign the resul to the following variables. which assignments are acceptable? float * r1; const float * r2; now, change the return type to float * and again attempt to assign the result to r1 and r2. what conclusion can you draw from these experiments? 5. comma-Delimited file: write a program that uses the FindNext funciton. each record in the file might contain payroll information such as, employee ID, last name, first name, hourly pay rate, and pay period ending date. ## Platform visual C++ compiler
Project ID: 3125629

About the project

2 proposals
Remote project
Active 20 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
Awarded to:
User Avatar
See private message.
$1 USD in 3 days
5.0 (8 reviews)
2.4
2.4
2 freelancers are bidding on average $3 USD for this job
User Avatar
See private message.
$4.25 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
5.0
3
Member since Nov 21, 2001

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.