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”, ...



#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

Write a program for String copy using pointers

#include<stdio.h> #include<conio.h> void strcopy(char *, char *); main() { char s[10], p[10]; printf(“enter a string”); gets(s); strcopy(s, p); puts(p); getch(); } ...

Write a c program to find maximum & minimum elements using Pointers.

#include<stdio.h> #include<conio.h> main() { Int i, n,min,max a[10]; int *p; printf(“enter how many elements”); scanf(“%d”, &n); printf(“enter elements”); for(i=0; &nbs...

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item