Program to Print all Even Numbers in an Array using Pointers.

#include<stdio.h> #include<conio.h>  main() { int a[10],n,i; printf(“enter size of the array”); scanf(“%d”, &a...



#include<stdio.h>
#include<conio.h> 
main()
{
int a[10],n,i;
printf(“enter size of the array”);
scanf(“%d”, &n);
printf(“enter the elements”);
for(i=0; i
scanf(“%d”, a[i]);
printf(“even numbers are \n”);
for (i=0; i
{
if (*(a+i)%2==0)
{
printf(“%d\n”, *(a+i));
}
}
getch();
}

Related

C Programs 2938220113055272135

Post a Comment

emo-but-icon

item