What are the disadvantages of using printf() in the embedded system programming?The major disadvantages of using printf() in the embedded system programming are as follows:
void printString(char *str) {
printf(str);
}
When the the function received a string with % in it, it crashes or opens a program vulnerability. This is because the printf() parses the % and then will pop arguments from the stack which do not exist, causing a stack error.
Hence, it is not recommended to use printf() in embedded system programming.