+ 2
How to reverse a word without using string in c++?
2 Respuestas
0
char name[]="Abhay";
char rev[20];
int j= name.length - 1;
for(int i=0; i<name.length; i++,j--)
rev[i] = name[j];
rev[i] = '\0';
cout<<rev;
//Print yahbA
0
https://code.sololearn.com/c50eKrgbv1Lk/?ref=app
Check this ☝️