Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Since format_type is initialized to UndefinedFormatType, the first test in the while statement will immediately fail and the loop will never be executed.
I presume the first line of the while statement should be:
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.