View Code of Problem 52

#include <stdio.h>
int main(){
	char num[100];
	int i,len;
	gets(num);
	len=strlen(str);
	for(i=len-1;i>=0;i--)
		printf("%c",num[i]);
	return 0;
}
/*
Main.c: In function 'main':
Main.c:5:2: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
  gets(num);
  ^
Main.c:6:2: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
  len=strlen(str);
  ^
Main.c:6:6: warning: incompatible implicit declaration of built-in function 'strlen'
  len=strlen(str);
      ^
Main.c:6:13: error: 'str' undeclared (first use in this function)
  len=strlen(str);
             ^
Main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
*/

Double click to view unformatted code.


Back to problem 52