CALL BY REFERENCE ADD

#include<stdio.h>
#include<conio.h>
//declaration
void add(int *a,int *b);
void main()
{
int n1,n2;
clrscr();
printf("\n\tEnter 1st no ");
scanf("%d",&n1);
printf("\n\tEnter 2nd no ");
scanf("%d",&n2);
add(&n,&n1); //call
getch();
}
//defination
void add(int *a,int *b)
{
int c=*a + *b;
printf("\n\tAddition = %d",c);

}

Output


No comments:

Post a Comment

Programmingway@Eklavya Technosys!: JTET 2026 | Computer Sections Solutions | Paper -II

Programmingway@Eklavya Technosys!: JTET 2026 | Computer Sections Solutions | Paper -II :   1) Which of the following is the extension of Not...