The strings that do not fall into any pattern, the string is printed to the standard output.
So be changed as follows
%%
0|[1-9]* {
k = atoi(yytext);
printf("Found the Number %d", k);
}
[a-zA-Z][a-zA-Z0-9]* {printf("Found the Identifier %s\n", yytext); }
. ;
"\n" ;
%%