#include<stdio.h>
#include<conio.h>
int main()
{
    int Dividend,divisor;
    printf("Checking Divisiblity of 1st number with 2nd number \n\n") ;
    printf("Enter Number \n") ;
    scanf("%d",&Dividend);
    printf("Enter Divisor = ");
    scanf("%d",&divisor) ;
    if(Dividend % divisor == 0)
    {
        printf("Number %d is divisible by %d",Dividend,divisor) ;
    }
    else
    {
        printf("Number %d is not divisible by %d",Dividend,divisor) ;
    }
    getch();
    return 0;
}
Above is my code that i have written in C ;
on running this program . Only on first execution of scanf function if i give two input space seperated , the second input is going on right variable . and on hitting enter i am getting result . I am not understanding how is this happing .
 
     
     
    