fork download
  1. #include <stdio.h>
  2. #include<string.h>
  3. void reverse();
  4. void revchars(char arr[]);
  5. void reverse()
  6. {
  7. char arr[100];
  8. printf("Enter a string to reverse\n");
  9. gets(arr);
  10. revchars(arr);
  11. }
  12. void revchars(char arr[])
  13. {
  14. strrev(arr);
  15.  
  16. printf("Reverse of the string is \n%s\n", arr);
  17.  
  18. }
  19. int main() {
  20. reverse();
  21. return 0;
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
jeetu lodhi
compilation info
prog.c: In function ‘reverse’:
prog.c:9:4: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
    gets(arr);
    ^~~~
prog.c: In function ‘revchars’:
prog.c:14:2: warning: implicit declaration of function ‘strrev’ [-Wimplicit-function-declaration]
  strrev(arr);
  ^~~~~~
/home/PEeIjU/ccN1CjKG.o: In function `reverse':
prog.c:(.text+0x17): warning: the `gets' function is dangerous and should not be used.
prog.c:(.text+0x21): undefined reference to `strrev'
/home/PEeIjU/ccN1CjKG.o: In function `revchars':
prog.c:(.text+0x47): undefined reference to `strrev'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty