Say I have a set of strings formatted with a printf for example:
printf("Name: %s, Age: %d, code:0x%08x\t\n",...);
Now I dont know the format string of the printf but have instances of the output call it a set of outputs example:
"Name: Brian Bach, Age: 24, code:0x00123456"
"Name: Julian Roter, Age: 32, code:0x00000456"
The task is to find the format_string that created this. Obviously there are many format strings that can produce this output but how to find the minimal format string (roughly minimum number of % specifiers)..
User contributions licensed under CC BY-SA 3.0