EmbLogic's Blog

Addition Using PASS BY VALUE

#include <stdio.h>
int add_num(int, int, int);                                              //function declaration
int add_num(int num1, int num2, int num3)               //function definition
{
int num4;
num4 = num1 + num2 + num3;                        //function body
return num4;
}
int main()
{
int i,x,y,z;
printf(“Enter three numbers:\n”);
scanf(“%d%d%d”,&x,&y,&z );
i = add_num(x,y,z);
printf(“sum of %d , %d and %d is %d:\n”,x,y,z,i
);
}

~
~
~
~
~
~
~
~
~
~
~
6,49-56       All

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>