How to send string in serial communication in AVR-C
Not quite sure, just a fast guess.
Maybe you should put the while(UDRE0 == 0){} inbetween sending characters.
I believe it's to wait until one character has been sent.

for (i = 0; i &lt; strlen(ar); i++){ 
   while (( UCSR0A &amp; (1&lt;&lt;UDRE0))  == 0){};
   UDR0 = ar[i]; 
}