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


Please Help Members By Posting Answers For Below Questions

Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

1454


Explain spaghetti programming?

682


What do header files do?

599


Explain how can I convert a string to a number?

643


What is the use of getchar() function?

624






Why is c called c?

620


Is null valid for pointers to functions?

605


In c programming language, how many parameters can be passed to a function ?

626


What are identifiers and keywords in c?

564


One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.

2155


Explain what is the difference between far and near ?

647


What is boolean in c?

603


How do you print an address?

738


Which is an example of a structural homology?

777


Explain what are bus errors, memory faults, and core dumps?

785