Find Jobs
Hire Freelancers

C Calculator

£10-20 GBP

Slutfört
Publicerad ungefär fem år sedan

£10-20 GBP

Betalning vid leverans
Hi, this is a simple homework task that Im stuck on, can someone help me complete and comment out what they have done to the code to make it work? thanks! : The source file contains the basic structure of a simple command line calculator which will understand the following basic commands “add N”, “sub N”, “mul N”, “div N” and “exit”, where N is a floating point value. 4.1 Complete the while loop by adding character sequentially to the buffer. 4.2 Implement a check to ensure that you don’t write past the end of the buffers limits. Writing passed the end of an array is called an overflow. When an potential overflow is detected write an error message to stderr using fprintf and then call exit(1) to force the program to terminate early. 4.3 Ensure that once the while loop has exited the buffer is correctly terminated with the string termination character. 4.4 Use the strcmp function to test if the line reads “exit”. If it does, then readLine should return 0 otherwise it should return 1. Test the program. It should quit when a user enters “exit” otherwise it should print “Unknown command”. 4.5 Modify the while loop in the main function. Check that the line contains a three characters followed by a space. You can use the isalpha function from ‘ctype.h‘ to check that a character is a letter. If the line does not meet this criteria, then output an error “Incorrect command format” to stderr and use continue to begin the loop again. 4.6 Assuming the criteria for 4.5 is met then use sscanf to extract the 3 character command and the floating point value from the buffer to command and a respectively. Note: You will need to pass in_value to sscanf prefixed with the & operator. E.g sscanf(..., &in_value). This will be explained in the next lecture. 4.7 Modify the condition false to check the command to see if it is equal to “add” 4.8 Create an else if condition for sub, mul and div. Test your program. 4.9 Add additional conditions using strncmp to test the first two letter of the command. If it is “ad” then output “Did you mean add?” Complete cases for “su”, “mu”, “di”. Test your program.
Project ID: 18685531

Om projektet

26 anbud
Distansprojekt
Senaste aktivitet fem år sedan

Ute efter att tjäna lite pengar?

Fördelar med att lägga anbud hos Freelancer

Ange budget och tidsram
Få betalt för ditt arbete
Beskriv ditt förslag
Det är gratis att registrera sig och att lägga anbud på uppdrag
Tilldelad till:
Använd avatar
Hi there, I do C programming and I would like to do this project if given the opportunity. I went through your requirements and I would be able to confidently solve it for you. Let me know if you are interested.
£20 GBP Om 1 dag
5,0 (550 omdömen)
7,2
7,2
26 frilansar lägger i genomsnitt anbud på £20 GBP för detta uppdrag
Använd avatar
Hi. I would like to help you to finish your project. Your program is very simple and I can finish it in a short time. Message me to discuss more details about the project
£16 GBP Om 1 dag
4,9 (61 omdömen)
5,5
5,5
Använd avatar
Hello. I am interesting in your project. I am C++ programmer. Please look my portfolios. I am new in freelance. so I have little reviews. But I think my skills , honest and integrity is more important than reviews. of course reviews are also very important. If you hire me, you can get the best chance to know another web master and the best results for a short time as lowest cost. I will always wait for your good news.
£13 GBP Om 1 dag
4,9 (24 omdömen)
5,4
5,4
Använd avatar
Hi, I am very happy to bid your project. I read your requirements carefully,so i see what you mean. I have been experiments with C Programming,Php. I'd like to work with you. i'll complete this project for you to the best my ability and without condition I am looking forward to meeting you
£18 GBP Om 1 dag
4,8 (15 omdömen)
4,3
4,3
Använd avatar
Hey, I have a major in Computer Science. I have done various projects in C. I will complete the whole project in the given deadline. Looking forward to having a positive response
£20 GBP Om 1 dag
5,0 (10 omdömen)
3,9
3,9
Använd avatar
I can do this project. I have experience of Python, C & C++ and Java programming for 4+ years. I can satisfy you perfectly. Please contact me and discuss in detail.
£20 GBP Om 1 dag
5,0 (10 omdömen)
3,6
3,6
Använd avatar
Hi, Hope you are good and well. We will give you Best results....! Before award project, Please send me you full project details --- Let discus your project. Deadline and budget? --- My Services: software, website, Database, Web-portal, Designing, Data Entry, android mobile app development, Content and Theory writing, Program code, and Assignments About me: - 4+ years of experience - Professional developer - Master Degree in Computer Science Feel free to ask any query. Thanks for your time...! ***** Wish you a very Happy life *****
£35 GBP Om 1 dag
5,0 (13 omdömen)
3,7
3,7
Använd avatar
Hi, I'm very good at programming with C. I can complete your task. Looking forward to working with you.
£20 GBP Om 1 dag
4,9 (6 omdömen)
3,8
3,8
Använd avatar
hi I have over 4 years of experience in programming. i am instructor of c at congigallery.com. i have great grip on c. i can make c calculator with command line arguments. Looking forward to work with you. Kindly see my portfolio and reviews. Regards, HAMMAD RAUF
£13 GBP Om 1 dag
5,0 (10 omdömen)
3,8
3,8
Använd avatar
Hello. I have 10+ years of C programming experience. I have read the description and checked the attached source code. I can start immediately and can deliver this program very quickly. Hope we can work together on this. I am here for chatting the details.
£30 GBP Om 1 dag
5,0 (9 omdömen)
3,4
3,4
Använd avatar
Hello, C programming is my area of expertise, I can finish this assignment for you tomorrow. Contact me if you are interested. Best regards!
£23 GBP Om 1 dag
5,0 (3 omdömen)
3,2
3,2
Använd avatar
Hello lets start your doing your home work. will take a single day to complete it. .......................................................................
£18 GBP Om 1 dag
4,9 (2 omdömen)
1,7
1,7
Använd avatar
I am an experienced BEng. Electrical and Electronics Engineer living in Cyprus. I am specialized in PCB design (Protheus, KiCad), Microcontrollers ESP3366, ESP32, Arduino, RaspberryPi. I have advanced knowledge on C++, MATLAB and Simulink.
£21 GBP Om 1 dag
5,0 (2 omdömen)
0,9
0,9
Använd avatar
We are a team of college students highly proficient in programming. We thrive to deliver best possible solution to our client.
£18 GBP Om 1 dag
0,0 (0 omdömen)
0,0
0,0
Använd avatar
Hi there! I have read what you exactly need, however I would like to ask you a few questions. Please feel free to ping me anytime so we can have a detailed discussion. Thanks.
£13 GBP Om 1 dag
0,0 (1 omdöme)
0,0
0,0
Använd avatar
Hello there! I am a final year undergraduate having done many projects using the C programming language. I can confidently take on this project.
£15 GBP Om 1 dag
0,0 (0 omdömen)
0,0
0,0
Använd avatar
Hello I can make Cprogram for you. My short Introduction Software Engineer with +5year Experince and also Manage AMctechnosoft Team.
£16 GBP Om 1 dag
0,0 (0 omdömen)
0,0
0,0
Använd avatar
I am an computer science student and this task is very simple to me.
£18 GBP Om 1 dag
0,0 (0 omdömen)
0,0
0,0
Använd avatar
I can do this task. I have 5+ year of experience on c programming. chat with me if you are ok with my bid.
£12 GBP Om 2 dagar
0,0 (0 omdömen)
0,0
0,0
Använd avatar
I am a competitive programmer so this project is a cakewalk . I figure 10.5 pounds is a fair price to get the job done perfectly . Worry not , I'LL COMMENT ALL IMPORTANT SNIPPETS so you won't face similar issue again . Peace !
£14 GBP Om 1 dag
0,0 (0 omdömen)
0,0
0,0
Använd avatar
hello sir I have good experience in c under both windows and Linux I read your description and attached file I can do this project and i will explant for you any thing not clear when i complete your project you can check and then you can accept my bid
£20 GBP Om 1 dag
0,0 (0 omdömen)
0,0
0,0

Om kunden

Flagga för UNITED KINGDOM
Matlock, United Kingdom
5,0
22
Verifierad betalningsmetod
Medlem sedan apr. 11, 2018

Kundverifikation

Tack! Vi har skickat en länk för aktivering av gratis kredit.
Något gick fel med ditt e-postmeddelande. Vänligen försök igen.
Registrerade Användare Totalt antal jobb publicerade
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Laddar förhandsgranskning
Tillstånd beviljat för geolokalisering.
Din inloggningssession har löpt ut och du har blivit utloggad. Logga in igen.