Using printf() in an ICC11 program

The only formats which work with ICC11 are %d, %x, %c and %s. To print a floating point number, type cast it as an int and use %d.
#include <stdio.h>


main()
{
	float speed;
	unsigned int period;
	char x,c,y;
	char s[] = "Hello, world!\n";

	period = 25176;

	speed = 1.5e7/(float) period;
	y = -32;
	x = 0xaa;
	c = 'A';

	printf("%d\n",(int) speed); /* Typecast float and use %d to print    */
	printf("%d\n",period);      /* Use %d to print int or char           */
	printf("%x\n",x);           /* Use %x to print an int in hex format  */
	printf("%c\n",c);           /* Use %c to print ASCII char            */
	printf("%s\n",s);           /* Use %s to print ASCII string          */
}