#include <stdio.h>
int main()
{
int a, b;
printf(“Enter the value of first variable: “);
scanf(“%d”, &a);
printf(“Enter the value of second variable: “);
scanf(“%d”, &b);
printf(“Value of first variable = %d\n”, a);
printf(“Value of second variable = %d\n”, b);
return 0;
}
int a, b; declares two integer variables.scanf() accepts values from the user.&a and &b provide the memory addresses where the entered values are stored.printf() displays the values of both variables.This website uses cookies.