Hi, getchar function is not working properly. An extra null character is appended for each and every input character. Ex: #include<stdio.h> int main() { int i,j=0; char buf[10]; xil_printf("main\n"); while(j<6) { i=getchar(); buf[j]=i; } xil_printf("%s\n",buf); return 0; } For the above program if i give input as: stefen Then it is printing on 's' I tried to print variable 'j' after getchar() function in code. Then for each character I enter 'j' value is incremented by two. Thanks, Nagaraju