السلام عليكــم ورحمـة الله وبركاتــه ،،
الكود التالي لبرنامج يستدعي داله تقوم بحساب معكوس سلسه حرفيه
واريد ان يفسر او يشرح لي الكود لان هناك اشياء اتوقفت عندها لم افهمها
#include<iostream.h>
#include<string.h>
char srev(char example);
{
char ch;
int n,f,i;
n=strlen(example)
f=0;
i=n-1;
while(f<=i)
{
ch=example[f];
example[f]=example;
example=ch;
f++;
i--;
}
cout<<example;
}
void main()
{
char str[50];
cout<<"enter string";
cin>>str;
srev(str);
cout<<str;
}