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
  • C Program for Implementation of Predictive Parser
  • Finding GCD and LCM of Given Numbers using C
  • C Program to Convert Temperature from Degree Centigrade to Fahrenheit
  • C Program to Find Largest Element in an Array
  • Evaluate Algebraic Expression (ax+b)/(ax-b)
  • C Program to Find Biggest of Two Numbers using Ternary
  • C Program to Find Nth Fibonacci Number Using Recursion
  • Bit Stuffing Program in C
  • C Program to Find Sum of Even Integers
  • C Program to Reverse Elements in Array
  • C Program to Find Sum of 5 Subjects and Percentage
  • C Program to Delete Characters from Given String
  • C Program to Design Lexical Analyzer
  • C Program to Find Sum of Individual Digits of a Positive Integer Number
  • C Program to Implement Structure with Array
  • Privacy Policy
  • Cookie Policy
© programming9.com 2026
Back to top