#include <stdio.h>
void wrapperPrint(char* s)
{
printf(s);
return;
}
int main()
{
wrapperPrint("Hello world\n");
wrapperPrint("This is a string");
return 0;
}
プログラムが文字列を正しく出力する場合(gcc 4.6.3でテスト済み)、%d、%sなどの形式指定子が必要なのはなぜですか。つまり、このプログラムの潜在的な問題は何ですか。