pag.gamit nmo sa reverse function kay sayop. You have defined it with one (1) parameter but you are using it with two (2). Next ang imong parameter kay char ang naka define, but sa pag.call na sa function Array ang imong gi.pass as parameter.
Question.
1. required jud nga mogamit ka ug function?
Code:
#include <stdio.h>
#include <conio.h>
#include <string.h>
void reverse(char str[]);
void main(){
char str_to_rev[80];
clrscr();
printf("Please enter a string: ");
gets(str_to_rev);
reverse(str);
getch();
}
void reverse(char str[]){
int x;
for(x=strlen(str); x>=0; x--){
printf("%c",str[x]);
}
}
I don't know if sakto ba na nga code, dugay2x nako wala nakagamit ug TurboC, please nlng ko correct sa mga errors.