Interview Questions

WHow do I convert an int to a char

C Interview Questions and Answers


(Continued from previous question...)

WHow do I convert an int to a char

Q: How do I convert an int to a char *? I tried a cast, but it's not working.

A: It depends on what you're trying to do. If you tried a cast but it's not working, you're probably trying to convert an integer to a string,If you're trying to convert an integer to a character, If you're trying to set a pointer to point to a particular memory address.

(Continued on next question...)

Other Interview Questions