programming in c

Write program to display all value of array using pointer

Posted on Updated on

C program to search an element in an array using pointers

#include<stdio.h>
#include<conio.h>
void max(int *p)
{
int i=0;
while(i<5)
{
printf(“%5d”,*p);
p++;
i++;
}
}
void main()
{
clrscr();
int ar[]={10,20,30,40,50};
max(ar);

}

This program solved by Ms. Aakriti Srivastav (Presented by Jitendra Kumar JAVA Trainer at Vtech Academy of Computers)- C | C++ | DS | JAVA | Android | Python & Oracle

Advertisements