programming9
  • Flowcharts
  • Programs
      • Back
      • C Programs
      • C++ Programs
      • Java Programs
      • Python Codes
      • HTML Codes
      • Java Script Codes
      • SQL Codes
  • Tutorials
      • Back
      • Java Tutorials
      • Competitive Programming
      • Python Tutorials
      • C Programming
  • Blog
  • Login

C Program for Call By Reference

Details
Written by: RajaSekhar
Category: C Programs
  • Basic C Programs-2
  • C Pointers

Call by Reference example code written in C Programming. The code explains how to pass address as arguments from calling function to called functions.

#include<stdio.h>
int main()
{
    int a,b,c;
    clrscr();
    printf("Enter Two Values: ");
    scanf("%d %d",&a,&b);
    c=add(&a,&b);
    printf("The Sum is: %d",c);
    return 0;
}
add(int *x,int *y)
{
    int z;
    z=*x+*y;
    return(z);
}

 OUTPUT:

Enter Two Values: 30 20
The Sum is: 50
Previous article: C Program to Design Lexical Analyzer Prev Next article: C Program to Find Address locations of Array Elements Using Pointers Next
  • Page Replacement Programs in C
  • C Program to Find Sum of Odd Integers
  • C Program to Find Area of a Square
  • C Program to Count Total Number of Digits in a Number
  • C Program to Delete Characters from Given String
  • C Program to Find Prime Factors of a Given Positive Number
  • C program to Print Triangle Pattern
  • C Program to Find Second Largest Number in an Array
  • C Program to Implement Call By Value using Functions
  • C Program to Implement SHELL SORT
  • C Program to Find Sum of N Natural Numbers
  • C Program to Find Biggest among Three Numbers
  • C Program to Find Radius and Circumference of a Circle
  • C Program to Convert Temperature from Degree Centigrade to Fahrenheit
  • C Program to Swap Two Numbers without using Third Variable
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top