Code:#include <stdio.h> #include <string.h> #include <conio.h> #include <math.h> void reverseAr(char ar[], int n); int main() { int choice; char *abc= ar[]; switch (choice) { case 1: reverseAr(ar); break; void reverseAr(char ar[], int n) { char c; char *p, *q; p = ar; if (!p) return; q = p + 1; if (*q == '\0') return; c = *p; reverseAr(ar[]); while (*q != '\0') { *p = *q; p++; q++; } *p = c; return; }
My codes keep couldn't get the reverse array of characters. Do anyone mind to tell me where is my mistake? Thank you in advance.