Home   Easy-Code    Forum  Updater 
Twitter Facebook



Program to keep the last 5 numbers in the first phase and first 5 numbers in the last phase of an array of 10 numbers without using dummy array using c

Critics Rating:

Users Rating:



/* PROGRAM TO KEEP THE LAST 5 NUMBERS IN THE FIRST PHASE AND FIRST 5 NUMBERS

IN THE LAST PHASE OF AN ARRAY OF 10 NUMBERS WITHOUT USING DUMMY ARRAY */



#include <stdio.h>

main()

{

int A[10],i,j,t;

clrscr();

printf("ENTER ANY 10 NUMBERS\n");

for(i=0;i<10;i++)

scanf("%d",&A[i]);

for(i=0;i<5;i++)

{

t=A[0];

for (j=0;j<9;j++)

   A[j]=A[j+1];

A[9]=t;

}

printf("AFTER ADJUSTING THE ARRAY IS\n");

for(i=0;i<10;i++)

printf("%d\n",A[i]);

getch();

}

Courtesy, Source, References & Regards: Kishore AVGK

While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright@2009-2011 by KuGuNi.com. All Rights Reserved.