View Code of Problem 54

#include <stdio.h>
#include <string.h>
int main()
{
	char a[100];
  	gets(a);
  	len=strlen(a);
  	for(int i=0;i<len-1;++i)
          printf("%c",a[i]);
  	printf("%c",a[len-1]);
  	
  	



}
/*
Main.c: In function 'main':
Main.c:6:4: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
    gets(a);
    ^
Main.c:7:4: error: 'len' undeclared (first use in this function)
    len=strlen(a);
    ^
Main.c:7:4: note: each undeclared identifier is reported only once for each function it appears in
*/

Double click to view unformatted code.


Back to problem 54