Find Jobs
Hire Freelancers

Given a C code, What sort of error would you expect to see? At what stage of building the program does this error occur?

$10-30 USD

Completed
Posted about 6 years ago

$10-30 USD

Paid on delivery
Consider the following code: #include <stdio.h> char * Flip_A_Coin(int x) { if (x%2 == 0) return("heads"); else return("tails"); } Assume that this code is stored in a file named coin1.c and compiled as follows: ahoover@video> gcc -o coin1 coin1.c What sort of error would you expect to see? At what stage of building the program does this error occur?
Project ID: 16655251

About the project

9 proposals
Remote project
Active 6 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
A proposal has not yet been provided
$10 USD in 1 day
3.0 (2 reviews)
0.6
0.6
9 freelancers are bidding on average $21 USD for this job
User Avatar
Hi there, I went through the initial description of the project. I'd like to have further details on the code and the topic of this subject. Let me know if you are interested.
$15 USD in 1 day
5.0 (797 reviews)
7.5
7.5
User Avatar
It doesn't compile on my Linux machine either. Send me a private message to discuss and I can help. Thanks.
$20 USD in 1 day
5.0 (8 reviews)
3.0
3.0
User Avatar
$ gcc -o coin1 coin1.c /usr/lib/gcc/x86_64-redhat-linux/7/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status
$25 USD in 1 day
5.0 (1 review)
2.3
2.3
User Avatar
this code will compile correctly and this function will return the address of the first letter of one of the two options depend on the function argument . both of the words will be written in part of NVM memory and or code will deal only with their address and we can read them but the problem will occur if we try in any line of our code to write in those addresses .. I have a big experience in C and work in a lot of project with it . I can give you a professional and readable code which will be easy to but any change on it if you want to add new features
$15 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Return type is char. And you return string. I hope it will work. Try and see what happen let me know if not work. Relevant Skills and Experience C,C#,PHP
$25 USD in 1 day
5.0 (1 review)
0.0
0.0

About the client

Flag of UNITED STATES
houston, United States
5.0
10
Payment method verified
Member since Aug 19, 2015

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) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
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.