View Code of Problem 52

#include<stdio.h>
#include<string.h>


int main() {
	char str[100];
	gets_s(str,100);
	int n;
	n = strlen(str);
	for (; n > 0; n--)
	{
		printf("%c", str[n - 1]);
	}

}
/*
Main.c: In function 'main':
Main.c:7:2: warning: implicit declaration of function 'gets_s' [-Wimplicit-function-declaration]
  gets_s(str,100);
  ^
/tmp/ccxUdziV.o: In function `main':
Main.c:(.text+0x1a): undefined reference to `gets_s'
collect2: error: ld returned 1 exit status
*/

Double click to view unformatted code.


Back to problem 52