Compiler output
prog.cpp: In function 'int main()':
prog.cpp:40:5: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets(buf);
^
prog.cpp:40:13: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets(buf);
^
prog.cpp:44:9: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets(buf);
^
prog.cpp:44:17: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets(buf);
^
prog.cpp:57:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ok &= (strlen(buf) == sum + 2);
^
/tmp/ccJXRyKK.o: In function `main':
prog.cpp:(.text.startup+0x2c): warning: the `gets' function is dangerous and should not be used.