printf("How are you?");as well as formatted statements:
age = 22; printf("You are %d years old", age);
To get user input, the scanf statement can be used to get input from standard input::
int age; printf("How old are you?"); scanf("%d", &age); printf("You are %d years old", age);The first argument is the format string detailing in what format the input is to be expected, while the second argument is the variiable list to be assigned to that input. Note the use of the address of operator & - the meaning of this will be discussed when we come to pointers in C.