Sunday, 14 February 2016

Adding Two Numbers In C Using Functions And Pointers

A Simple Program To Add Two Numbers Using Functions and Pointers, Entered By User.

 

#include<stdio.h>
int point(int *k,int *j);
int main(){

    int a,b,*p,*q,sum;
printf("Enter two numbers:");
scanf("%d %d",&a,&b);
point(&a,&b);
return 0;
}
int point(int *k,int *j)
{
    int u,o,sum;
    sum=*k+*j;
    printf("Sum is %d",sum);
    }

--------------------------------------------------------------------
For any question or help leave a comment....  

No comments:

Post a Comment