Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 347 Weeks Ago, 4 Days Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Programming Posted 11 Jun 2017 My Price 5.00

Write a function, char* strdup(const char*), that copies a C-style string into memory

Write a function, char* strdup(const char*), that copies a C-style string into memory it allocates on the free store. Do not use any standard library functions.

 

Answers

(8)
Status NEW Posted 11 Jun 2017 11:06 AM My Price 5.00

-----------

Attachments

file 1497181517-Answer.docx preview (99 words )
#-----------inc-----------lud-----------e &-----------amp-----------;lt-----------;io-----------str-----------eam-----------&am-----------p;g-----------t; ----------- us-----------ing----------- na-----------mes-----------pac-----------e s-----------td;----------- c-----------har-----------* s-----------trd-----------up_-----------2(c-----------ons-----------t c-----------har-----------* c-----------h){----------- /-----------/1.----------- ge-----------t s-----------ize----------- b-----------ool----------- do-----------ne -----------= f-----------als-----------e; ----------- in-----------t s-----------ize----------- = -----------0; ----------- wh-----------ile----------- (!-----------don-----------e){----------- i-----------f (-----------ch[-----------siz-----------e] -----------== -----------'\0-----------') ----------- do-----------ne -----------= t-----------rue-----------; -----------siz-----------e++-----------; -----------} -----------//a-----------llo-----------cat-----------e e-----------nou-----------gh -----------mem-----------ory----------- an-----------d c-----------opy----------- ea-----------ch -----------ele-----------men-----------t ----------- //-----------fro-----------m o-----------rig-----------ina-----------l t-----------o d-----------upl-----------ica-----------te ----------- ch-----------ar*----------- p -----------= n-----------ew -----------cha-----------r[s-----------ize-----------]; ----------- fo-----------r (-----------int----------- i -----------= 0-----------; i----------- &a-----------mp;-----------lt;-----------= s-----------ize-----------; i-----------++)-----------{ -----------p[i-----------] =----------- ch-----------[i]-----------; -----------} -----------ret-----------urn----------- p;----------- }----------- i-----------nt -----------mai-----------n()-----------{ -----------con-----------st -----------cha-----------r c-----------_st-----------r[]----------- = -----------&qu-----------ot;-----------Hel-----------lo,-----------
Not Rated(0)