how to find out the biggest element (or any other
operation) in an array which is dynamic. User need not to
mention the array size while executing.
Answer Posted / vignesh1988i
it is said that while executing also the user should not specify the size means it can be done in another method without using ARRAYS......... using only one variable.. since it is asked to find only the biggest element , this program suits.....
#include<stdio.h>
#include<conio.h>
void main()
{
int n,BIG;
printf("enter the numbers :");
scanf("%d",&n);
BIG=n;
do
{
fflush(stdin);
scanf("%d",&n);
if(n>=BIG)
BIG=n;
}while(((char)n>=65)&&((char)<=122));
printf("the biggest number is : %d",BIG);
getch();
}
thank u
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is the use of header files?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
Why should I prototype a function?
What is huge pointer in c?
How do you declare a variable that will hold string values?
What are bitwise shift operators in c programming?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
List some of the dynamic data structures in C?
What are the complete rules for header file searching?
What is a const pointer?
What is a lookup table in c?
How can you find the day of the week given the date?
What is binary tree in c?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
What is wrong with this program statement? void = 10;