Limit Output in C

Posted by Tech163 on Stack Overflow See other posts from Stack Overflow or by Tech163
Published on 2010-05-29T01:31:35Z Indexed on 2010/05/29 1:42 UTC
Read the original article Hit count: 182

Filed under:

In C, I would like to limit the string to the first 8 characters. For example, I have:

char out = printf("%c", str);

How can I make it so it only returns the first 8 characters?

© Stack Overflow or respective owner

Related posts about c