Shifting Values To Right In C Program Tamil


//	x=5   y=8 z=10
//	x=10  y=5 z=8
#include<stdio.h>
#include<conio.h>
void fun(int,int,int);    // Function Prototype
void main()
{
	int x,y,z;
	clrscr();
	printf("\n Enter the Three Values :");
	scanf("%d%d%d",&x,&y,&z);
	printf("\n Values of x,y,z :");
	printf("\nx=%d\ty=%d\tz=%d",x,y,z);
	fun(x,y,z);		//Function Calling
	getch();
}
void fun(int x,int y,int z)
{
	int t,i;
	for(i=0;i<=1;i++)
	{
		t=z;
		z=y;
		y=x;          // www.tutorjoes.com
		x=t;
		printf("\n After Shifting Values :\n");
		printf("\n x=%d\ty=%d\tz=%d",x,y,z);
	}
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming