What do you mean "Isn't working"?
It doesn't compile as posted - is that it?
Code:
$ gcc -Wall bar.c
bar.c: In function ‘main’:
bar.c:10: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)[80]’
bar.c:12: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)[80]’
bar.c:14: error: ‘size1’ undeclared (first use in this function)
bar.c:14: error: (Each undeclared identifier is reported only once
bar.c:14: error: for each function it appears in.)
bar.c:15: error: ‘size2’ undeclared (first use in this function)
bar.c:8: warning: unused variable ‘max’
bar.c:8: warning: unused variable ‘megethos2’
bar.c:8: warning: unused variable ‘megethos1’
Fixing the size declaration problem, it "works" for me, albeit with some warnings which you should fix.
Code:
$ gcc -Wall bar.c
bar.c: In function ‘main’:
bar.c:10: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)[80]’
bar.c:12: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char (*)[80]’
bar.c:8: warning: unused variable ‘max’
bar.c:8: warning: unused variable ‘megethos2’
bar.c:8: warning: unused variable ‘megethos1’
bar.c:27: warning: control reaches end of non-void function
$ ./a.out
Give first string: hello
Give second string: lo
he $