Answers for "write a c program to swap two numbers using call by value method. //by representing the actual and formal parameters"

0

c program for swapping of two numbers using temporary variable

#include <stdio.h>
int main()
{
    int a, b, temp;
    printf("enter the values of a and b: \n");
    scanf("%d%d", &a, &b );
    printf("current values are:\n a=%d\n b=%d\n", a, b);
    temp=a;
    a=b;
    b=temp;
    printf("After swapping:\n a=%d\n b=%d\n", a, b);
}
Posted by: Guest on April-19-2021

Code answers related to "write a c program to swap two numbers using call by value method. //by representing the actual and formal parameters"

Browse Popular Code Answers by Language