Explanation: This Input and Output of an integer C Program demonstrates the input and output of an integer in C programming language.
The scanf
function is used to take input from the user and store it in the variable num
. The %d
format specifier is used to read an integer value. The ampersand &
symbol is used to get the address of the variable num
. The printf
function is used to print the message “The number you entered is: %d” on the screen.

#include <stdio.h>
int main()
{
int num;
printf("Enter a number: ");
scanf("%d", &num);
printf("The number you entered is: %d", num);
return 0;
}
OUTPUT
Enter a number: 4
The number you entered is: 4
[…] then define the Output_Control_Data procedure, which takes in the Control_Data record as input and outputs the control data to the console using the Ada.Text_IO […]