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 to copy one String into Another and Count the number of Characters Copied

#include<stdio.h> #include<conio.h> void main ( ) { char str1 [80], str 2 [80]; int i ; printf (“enter a string \n”); scanf (“%s” str 2); for ( i =0; str 2[i]! = ‘\0’, i++) s...

Write a Program for Reverse of a string

#include<stdio.h> #include<conio.h> #include<string.h> void main() { char a [20], b[20]; int i,j = 0, n; printf (“\n enter string”); gets (a); puts (a); n = strlen ( a)...

Write A Program to read the order of matrix and read elements into 2 dimentional array and display the elements in matrix format

#include<stdio.h> #include<conio.h> void main ( ) { int x[10][10],i,j,m,n; clrscr ( ); printf (“enter order of matrix”); scanf ("%d%d”,&n,&m); for ( i =0; < n; i++) ...

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