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 to Implement Structure with Array
  • Bubble Sort in C
  • C Program to Find Address locations of Array Elements Using Pointers
  • C Program to Perform Arithmetic Operations Using Switch
  • C Program to Calculate NCR
  • Swap Two Static Numbers Using C
  • C Program to Find Nth Fibonacci Number Using Recursion
  • C Program to Find Factorial of a Number using While Loop
  • C Program for Sum of Digits of a Number using Recursion
  • C Program to Find Area of a Triangle
  • C Program to Sort an Array using SELECTION SORT
  • C Program to Search an Array Element using BINARY SEARCH
  • C Program to Find Given Number is Perfect or Not
  • C Program to Find Area and Circumference of a circle.
  • C Program to Find Number of Characters and Words in a String
  • Privacy Policy
  • Cookie Policy
© programming9.com 2025
Back to top