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
State two uses of pointers in C?
What do you mean by dynamic memory allocation in c? What functions are used?
What does char * * argv mean in c?
What are the different types of pointers used in c language?
Why do some versions of toupper act strangely if given an upper-case letter?
what is the structure pointer?
What is calloc()?
What is data structure in c programming?
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
What are called c variables?
How old is c programming language?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
Can we compile a program without main() function?
Explain what are preprocessor directives?
What is 1f in c?