#include <stdio.h>
int add(int a, int b)//pass by value function
{
    return a+b;
}

int addr(int *c,int *d)//pass by reference function
{
	return( *c + *d );
}

int main()
{
    //printf("Hello, World!\n");
    int a,b;
    printf("enter 2 digits");
    
    scanf("%d%d", &a,&b);
    printf("there sum is %d",add(a,b)); //invoking pass by value
    
    int *p; //creating a pointer to variable
    p=&a;
    *p=26;
    
    printf("\nmodified value of a is %d",a);
   
    printf("\n using reference\n");
    printf("%d",addr(&a,&b)); //invoking pass by reference function

    return 0;
}