View Code of Problem 114

#include <stdio.h>
#include <string.h>
int main(){
  char a[100];
  char b[100];
  int i,j;
  gets(a);
  for(i=strlen(s)-1;i>=0;i--){
    b[j++] = a[i];
  }
  b[j] = '\0';
  puts(b);

return 0;
}
/*
Main.c: In function 'main':
Main.c:7:3: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
   gets(a);
   ^
Main.c:8:16: error: 's' undeclared (first use in this function)
   for(i=strlen(s)-1;i>=0;i--){
                ^
Main.c:8:16: note: each undeclared identifier is reported only once for each function it appears in
*/

Double click to view unformatted code.


Back to problem 114