Compiler output
prog.cpp: In function 'int main()':
prog.cpp:14:22: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[40]' [-Wformat=]
scanf("%s",&s);
^
prog.cpp:16:40: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(m>1){printf("Incorrect!\n");gets(s);continue;}
^
prog.cpp:16:46: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(m>1){printf("Incorrect!\n");gets(s);continue;}
^
prog.cpp:18:53: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(ok==1&&s[0]!='B'){printf("Incorrect!\n");gets(s);continue;}
^
prog.cpp:18:59: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(ok==1&&s[0]!='B'){printf("Incorrect!\n");gets(s);continue;}
^
prog.cpp:21:59: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(s[j]<'A'||s[j]>'Z'){printf("Incorrect!\n");gets(s);ok1=1;}
^
prog.cpp:21:65: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(s[j]<'A'||s[j]>'Z'){printf("Incorrect!\n");gets(s);ok1=1;}
^
prog.cpp:25:22: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[40]' [-Wformat=]
scanf("%s",&s);
^
prog.cpp:27:48: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(m!=1&&ok==0){printf("Incorrect!\n");gets(s);continue;}
^
prog.cpp:27:54: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(m!=1&&ok==0){printf("Incorrect!\n");gets(s);continue;}
^
prog.cpp:28:54: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(ok==1&&m!=1&&m!=2){printf("Incorrect!\n");gets(s);continue;}
^
prog.cpp:28:60: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(ok==1&&m!=1&&m!=2){printf("Incorrect!\n");gets(s);continue;}
^
prog.cpp:31:59: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(s[j]<'0'||s[j]>'9'){printf("Incorrect!\n");gets(s);ok1=1;}
^
prog.cpp:31:65: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(s[j]<'0'||s[j]>'9'){printf("Incorrect!\n");gets(s);ok1=1;}
^
prog.cpp:35:22: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[40]' [-Wformat=]
scanf("%s",&s);
^
prog.cpp:37:41: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(m!=2){printf("Incorrect!\n");gets(s);continue;}
^
prog.cpp:37:47: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(m!=2){printf("Incorrect!\n");gets(s);continue;}
^
prog.cpp:39:59: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(s[j]<'A'||s[j]>'Z'){printf("Incorrect!\n");gets(s);ok1=1;}
^
prog.cpp:39:65: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
if(s[j]<'A'||s[j]>'Z'){printf("Incorrect!\n");gets(s);ok1=1;}
^
/tmp/cctMwTJp.o: In function `main':
prog.cpp:(.text.startup+0x8a): warning: the `gets' function is dangerous and should not be used.