HTML Tutorial || Networking Assignment || Computer Full Forms || Ms-Office Shortcut Keys || Ms-Office Notes || Number System Notes || Internet Assignment
JavaScript Tutorial || CSS Tutorial || Operating System Notes || History of Computer Assignment || Netwoking Notes || Computer Fundamentals Notes

C program to Input an Array of 7 Elemnts & Copy into Another Array only Odd Elements ?


Q:- Write a C program to Input an Array of 7 Elemnts & Copy into Another Array only
       Odd Elements ?
            #include<stdio.h>
            #include<conio.h>
            main()
  {
int a[7],b[7],i,j;
clrscr();
printf(“Enter 7 Elements =”);
for(i=0;i<7;i++)
scanf(“%d”,&a[i]);
i--;
for(j=6;j>=0;j--)
{
a[i] % 2!=0
b[j]=a[i];
i--;
}
printf(“Elements of Array B are \n”);
for(j=0;j<7;j++)
printf(“%d”,b[j]);
getch();
      }