วิธีที่ 1: ใช้ for loop (Manual Reverse) #include <stdio.h> int main() { char str[100]; int i = 0; printf(Enter message: ); while((str[i] = getchar()) != \n && i = 0; i--) putchar(str[i]); putchar(\n); return 0; } ผลลัพธ์ enter the message: Hi welcome to my world