c - Simple int to char[] conversion -


i have simple question

how convert integer (getting values 0-8) char, e.g. char[2] in c?

thanks

main() {   int = 247593;   char str[10];    sprintf(str, "%d", i); // str contains integer characters } 

hope helpful you.


Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -