C examples for Language Basics:printf
Output string, int and float type variable with printf()
#include <stdio.h> int main()//from w ww .j a v a 2 s .c om { char menuitem[] = "Slimy Orange Stuff \"Icky Woka Gu\""; int pints=1; float price = 1.45; printf("Today special - %s\n",menuitem); printf("You want %d pint.\n",pints); printf("That be $%f, please.\n",price); return(0); }