jituTechnology

jituTechnology

A program to swap the content of two integer variable using call by reference.

A program to swap the content of two integer variable using call by reference.

Codes
/*A program to swap the content of two integer variable using call by reference*/
/*Programed by          Jitendra Kr Yadav
                        10116
                        2Apr,2011*/
#include<stdio.h>
#include<conio.h>
void swap(int*, int *);
main()
{
inta,b;
printf(“Enter the value of a and b:\n”);
scanf(“%d%d”,&a,&b);
swap(&a,&b);
printf(“a = %d and b = %d”,a,b);
printf(“Press any key to continue…”);
getch();
}
void swap(int*x,int*y)
{
int temp;
temp=*x;
*x=*y;
*y=temp;
}
Output
Enter the value of ‘a’ and ‘b’:
5
2
a = 2 and b = 5
Press any key to continue…
Add a comment

Comments (3)

  1. polo shirts cheapMarch 24, 2012 Reply
    I must say your own website is actually outstanding! I will undoubtedly arrive again once again!
  2. shirtsMarch 27, 2012 Reply
    Thank you for the beneficial writeup. It in reality was a amusement account it. glimpse exceptional to far additional agreeable from you! By the way, how could we communicate?
  3. Mose KennersonApril 6, 2012 Reply
    I’ve learned new things from a blog post. One other thing I have recognized is that typically, FSBO sellers are going to reject you actually. Remember, they’d prefer not to use your products and services. But if you maintain a gradual, professional partnership, offering aid and remaining in contact for four to five weeks, you will usually be capable to win a business interview. From there, a listing follows. Thanks a lot

Add a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Connect with Me

GPO 8973 NPC 541; Kathmandu Nepal
Phone: +977 9851236800

Calendar

March 2024
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930
31