user46302: I am using:
Serial.print(rawCodes[i - 1], DEC);

to print into serial monitor, but how can I save (rawCodes[i - 1], DEC) to save into variable?

user30175: Assuming your code comes from here: https://www.alanzucconi.com/2015/08/19/how-to-hack-any-ir-remote-controller/ 
Since rawCodes is declared as 
unsigned int rawCodes[35];

I.e., it is a 35-element array of unsigned int elements, we can access a single unsigned int element at some index and save it in a variable like
unsigned int myVariable = rawCodes[i - 1]; //assuming i is some integer variable 
                                           //and exists in this scope

If conversion to a String object is needed it can be passed into the constructor of the String class as 
String myString = String(myVariable);

That answers your syntactical question on how to save that element into a variable; however, it is unlikely that this is your real underlying problem. We cannot determine that until you tell us what exactly you actually want.
References: 

Arrays in C tutorial 


46302: <p>I am using:</p>

<pre><code>Serial.print(rawCodes[i - 1], DEC);
</code></pre>

<p>to print into serial monitor, but how can I save <code>(rawCodes[i - 1], DEC)</code> to save into variable?</p>
 30175: <p>Assuming your code comes from here: <a href="https://www.alanzucconi.com/2015/08/19/how-to-hack-any-ir-remote-controller/" rel="nofollow noreferrer">https://www.alanzucconi.com/2015/08/19/how-to-hack-any-ir-remote-controller/</a> </p>

<p>Since <code>rawCodes</code> is declared as </p>

<pre><code>unsigned int rawCodes[35];
</code></pre>

<p>I.e., it is a 35-element array of <code>unsigned int</code> elements, we can access a single <code>unsigned int</code> element at some index and save it in a variable like</p>

<pre><code>unsigned int myVariable = rawCodes[i - 1]; //assuming i is some integer variable 
                                           //and exists in this scope
</code></pre>

<p>If conversion to a <code>String</code> object is needed it can be passed into the constructor of the <code>String</code> class as </p>

<pre><code>String myString = String(myVariable);
</code></pre>

<p>That answers your syntactical question on how to save that element into a variable; however, it is unlikely that this is your real underlying problem. We cannot determine that until you tell us what exactly you actually want.</p>

<p>References: </p>

<ul>
<li><a href="https://www.tutorialspoint.com/cprogramming/c_arrays.htm" rel="nofollow noreferrer">Arrays in C tutorial</a> </li>
</ul>
