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

Can we use any name in place of argv and argc as command line arguments?

1078


What is cohesion in c?

983


What is keyword in c?

1017


Can the sizeof operator be used to tell the size of an array passed to a function?

1119


What is the size of structure pointer in c?

1069


Why shouldn’t I start variable names with underscores?

1067


Explain the meaning of keyword 'extern' in a function declaration.

1155


What is the scope of an external variable in c?

1050


Difference between exit() and _exit() function?

1143


Write a program to print factorial of given number without using recursion?

996


What are identifiers and keywords in c?

1107


What are comments and how do you insert it in a C program?

1254


Where is volatile variable stored?

1092


What is the use of linkage in c language?

1067


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

6876