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...

find largest element in array w/o using sorting techniques.

Answer Posted / manjunath

#include<stdio.h>
void main()
{
int a,b[4]={3,2,7,4,9};
a[0]=b[0];
for(i=1;i<5;i++)
{
if(a<b[i])
{
a=b[i];
}
}
printf("the largest num is %d",a);
}

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to write a c program to print list of fruits in alpabetical order?

2265


What does the function toupper() do?

1081


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1878


What is a constant and types of constants in c?

1085


What is difference between static and global variable in c?

1003


Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"

2051


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

1209


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1024


struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer

1258


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.

1045


What does 3 periods mean in texting?

1025


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

1249


Is c high or low level?

977


Can two or more operators such as and be combined in a single line of program code?

1326


Describe how arrays can be passed to a user defined function

1250