WRITE A C PROGRAM TO FIND SECOND BIGGEST VALUE FROM THE
GIVEN VALUES
Answer / naveen
#include<stdio.h>
#include<math.h>
void main()
{
int a[],n,b;
printf("Enter the number of digits you want to enter:");
scanf(%d",&n);
printf("Enter the different values you want:")
for(i=0;i<=n;i++)
{
scanf(%d",a[i]);
}
/* This will make the values to be arranged in descending
order*/
for(i=0;i<=n;i++)
{
if(a[i] >> a[i+1])
{
}
else
{
b = a[i];
a[i] = a[i+1];
a[i+1] = b;
}
}
/* As a[0] will be the max value the next to it a[1] will be
second highest*/
printf("The second largest value will be: %d",&a[1]);
}
Is This Answer Correct ? | 36 Yes | 42 No |
do you think its fraud or original company?
How to run c Program without using IDE of c. means if program made in notepad.then how to compile by command prompt.
What are linked lists in c?
what is the difference b/w NULL and null?
write a c/c++ programthat connects to a MYSQL server and checks if the INNoDB plug in is installed on it.If so your program should print the total number of disk writes by MYSQL.
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
Explain zero based addressing.
What is storage class?
Input is "Jack and jill went up a hill" To print output is 1-letter word(s)-1 2-letter words-1 3-letter words-1 4-letter words-4
write a c program to find largest number in matrix(in each row,each column, diagonally, and in the whole matrix)? Its urgent.
pierrot's divisor program using c or c++ code
Explain what is the difference between the expression '++a' and 'a++'?