I have certain doubts when wrong format strings are used in sprintf. Lets say for example %f is used as format specifier for an integer. Why is it not doing an implicit conversion? Consider the following program.
#include <stdio.h>
#include <string>
using namespace std;
int main()
{
int i = 0;
char temp[50];int a = 1;
sprintf( temp, "%f",a);
puts(temp);
return 1;
}