QP School

Full Version: Input and Output functions (printf and scanf) in C
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
`printf()` is used to display output to the console, and scanf() is used to read input from the user.

int age;
printf("Enter your age: ");
scanf("%d", &age);
printf("Your age is %d\n", age);