Input/Output - Standard I/O
Standard input - from keyboard
Standard output - to screen
Examples of standard library functions:Output: printf, putchar, puts, fprintfInput: scanf, getchar, gets, fscanf
printf, scanf use special formats to readand write different variable types:int j; float f; double d; char c;printf(“%d %f %lf %c”, j, f, d, c);scanf(“%d %f %lf %c”, &j, &f, &d, &c);
& is the address operator. When reading a value into a variable we use &.
main () { int j; for (j=1; j j++) { printf(“Hello world\n”); printf(“j = %d\n”,j); } }