Dynamic allocation in C

Posted by Kerby82 on Stack Overflow See other posts from Stack Overflow or by Kerby82
Published on 2010-05-18T10:02:46Z Indexed on 2010/05/18 10:10 UTC
Read the original article Hit count: 112

Filed under:
|

I'm writing a program and I have the following problem:

char *tmp;
sprintf (tmp,"%ld",(long)time_stamp_for_file_name);

Could someone explain how much memory allocate for the string tmp.

How many chars are a long variable?

Thank you,

I would appreciate also a link to an exahustive resource on this kind of information.

Thank you

© Stack Overflow or respective owner

Related posts about c

    Related posts about programming