Array 3 -Write a Program to print alternate element of an array

# include<stdio.h>
# include<conio.h>

void main()
{
int arr[10];
int i,j,temp;
clrscr();
for(i=0;i<10;i++)
scanf("%d",&arr[i]);
for(i=0;i<10;i+=2)
printf("%d ",arr[i]) ;
getch();
}

6 comments:

  1. http://cprogrammingandandroid.blogspot.com/2014/01/wap-to-matrix-subtraction.html

    ReplyDelete
  2. Good
    Here is a link for C/C++ programs and pointer programs. This may be useful for you.

    C Programs

    C++ Programs

    ReplyDelete
  3. Good
    Here is a link for C/C++ programs and pointer programs. This may be useful for you.

    C Programs

    C++ Programs

    ReplyDelete
  4. https://2dmatrix.blogspot.in/
    this for alternate elemnts of a 2d matrix

    ReplyDelete

Related Post

Array:
String functions:
General (Loops-for/while)
Write a Program to print reverse of a given number Write a Program to print Product of Digits (eg. 212=2*1*2=4) of a given number Write a C++ Program to Convert Binary into Decimal Number