How do I store an unsigned short into a char array? C language
<p>I'm a beginner in C language, I was wondering how I store an unsigned short into a char array? </p>

<p>unit16_t is unsigned short, and below is my code. </p>

<pre><code>uint16_t  combined = 1234;
char echoPrompt[] = {combined};
</code></pre>

<p>EDIT: </p>

<p>Sorry for being unclear 
I need echoPrompt to be a char array and combined needs to be an integer. I am passing echPrompt as a char array to a UART_write which required a char array. </p>