Mon Jun 27 2022 11:56:07 GMT+0000 (Coordinated Universal Time)
Saved by @KanishqJ8
#include <stdio.h> int main(){ char s[]="Harrys"; int len=0; while(s[len]!='\0'){ len++; } printf("%d\n",len); for(int i=0; i<=((len-1)/2);i++){ int temp=s[i]; s[i]=s[len-1-i]; s[len-1-i]=temp; } printf("%s",s); return 0; }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments