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
Explain 'bit masking'?
What is boolean in c?
Write a program to generate the Fibinocci Series
What is the difference between arrays and pointers?
List some of the dynamic data structures in C?
What is n in c?
What is actual argument?
Is c++ based on c?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
How will you write a code for accessing the length of an array without assigning it to another variable?
Explain what is dynamic data structure?
Explain how can a program be made to print the line number where an error occurs?
What is the use of parallelize in spark?
how to print the character with maximum occurence and print that number of occurence too in a string given ?