Dear Experts,
I have a semi kind of philosophical question with regards to the usage of Printf() function. My teacher remarked printf() methods could be disturbing when we use that function e.g in the embedded system environment. So removing these printf() calls is preferred.
Can you show me a illustrative example where it ( removing printf() ) is useful ? Besides of the embedded systems, Is there any other part where these Printf() calls would be disturbing ?
Thank you very much for your help!
Code:
#include <stdio.h>
int main()
{
int result = sum( 4, 43);
printf("result: %d", result);
getch();
}
int sum ( int a , int b)
{
printf("'a' variable: %d\n",a); // the disturbing printf() -s
printf("'b' variable: %d\n",b);
printf("'summary: %d\n",a+b);
return a+b;
}