Untitled

mail@pastecode.io avatarunknown
c_cpp
a month ago
374 B
1
Indexable
Never
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <string.h>

int main()
{
   char str[] = "Hello World";
   int length = strlen(str);
   int temp, i, j;
   for (i = 0; i < j; i++)
    for (j = length - 1; j >= 0; j--)
   {
       temp = str[i];
       str[i] = str[j];
       str[j] = temp;
   }
   printf("%s", str );
   return 0;
}