[Solved] printing int in c by %s in printf
You are using wrong specifier for int data type. Its undefined behavior. Any thing could happen. Undefined Behavior: Anything at all can happen; the Standard imposes no requirements. The program may fail to compile, or it may execute incorrectly (either crashing or silently generating incorrect results), or it may fortuitously do exactly what the programmer … Read more