Computer Science, asked by pavima, 1 year ago

get an array.compare the first element with the last element. if the values are same,return true, or else return false.

Answers

Answered by Nilofar
1
#include<stdio.h>
#define TRUE 1
#define FALSE 0
void main()
{ int arr[10],i;
printf("Enter the array values");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
if(a[0]==a[10])
 return TRUE;
else
return FALSE;
getch();
}
Answered by Shravani83
1
#define TRUE 1
#define FALSE 0
void main()
{ int arr[10],i;
printf("Enter the array values");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
if(a[0]=a[10])
 return TRUE;
else 
return FALSE;
getch();
}
Similar questions