Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to find the largest element of array without using relational operater?

Answer Posted / upendra singh and avinash cho

#include<stdio.h>
#include<string.h>
void main()
{
int arr[4]={1,10,5,4},c,i,k,j=1;
k=arr[0];
for( i=0;i<3;i++)
{ c=k-arr[i+1];
c=c>>15;
if(c)
k=arr[i+1];
}
printf("largest number %d",k);
getch();
}

Is This Answer Correct ?    25 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why #include is used in c language?

1034


Explain two-dimensional array.

1043


Explain void pointer?

1029


Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?

2671


How can I pad a string to a known length?

1021


What is union and structure?

1106


is it possible to create your own header files?

1091


What does sizeof int return?

1065


show how link list can be used to repersent the following polynomial i) 5x+2

2278


What is extern c used for?

1045


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

1083


Hai what is the different types of versions and their differences

1931


What is integer constants?

1062


What does s c mean in text?

1089


Why static is used in c?

1083