Jump to content
YOUR-AD-HERE
HOSTING
TOOLS
992Proxy

Locked Mid o substr en C


Expermicid

Recommended Posts

[lenguaje=c]#include

#include

#include

/***********************************

* Coder: Linkgl *

* Fecha:17/12/10 *

***********************************/

char *substr(char * szCadena,int dwInicio,int dwLongitud)

{

int i;

char *szNueva=(char *)malloc(strlen(szCadena));

memset(szNueva,0,strlen(szCadena));

for(i=dwInicio;i

szNueva[strlen(szNueva)]=szCadena;

return szNueva;

}

//->implementacion

int main ()

{

printf("La cadena es : %s",substr("funciona con underc0de",13,9));

getchar();

return 0;

} [/lenguaje]

 

Autor: Linkgl

Edited by Expermicid
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.