Shopping In MUMBAI

Are you searching for Discounts, offers, sale in Mumbai ? You are in the right place. MUMBAI, a shopping haven, has no dearth of great discounts and sales. This blog features the best MUMBAI shopping offers, sale, discounts and deals and bargains CURRENTLY GOING on in Mumbai plus a few free things thrown in on top. Don't wait for it because once they are gone, they are gone. Hurry!..By clicking the "Like" button you will receive a daily update of discounts, sale, offers going on in Mumbai. LIKE IT.... SHARE IT...njoY.

Tuesday, December 30, 2008

C program to shift an element by one location to the left in an array of n elements

Write a C program to shift an element by one location to the left in an array of
n elements.

#include
#include
void main()
{
int i,n,a[20];
clrscr();
printf("How Many Numbers You Want To Enter==");
scanf("%d",&n);
printf("\nEnter %d Numbers\n",n);
for(i=0;i scanf("%d",&a[i]);
for(i=1;i a[i-1]=a[i];
printf("\nNumbers In An Array After Shifting One Places To Left\n");
for(i=0;i printf("%d ",a[i]);
getch();
}

/*Output
How Many Numbers You Want To Enter==3

Enter 3 Numbers
69
54
12

Numbers In An Array After Shifting One Places To Left
54 12
*/

C program to shift an element by one location to the left in an array of n elementsSocialTwist Tell-a-Friend

0 comments:

SUPPORT THIS BLOG