Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

When the macros gets expanded?

1335


What is pointer to pointer in c language?

1046


What is a const pointer in c?

1071


Array is an lvalue or not?

1064


What is structure of c program?

1071


Write a program of prime number using recursion.

1033


Using which language Test cases are added in .ptu file of RTRT unit testing???

4216


What is the 'named constructor idiom'?

1029


What is the difference between array and pointer in c?

1084


What is calloc()?

1022


How do you write a program which produces its own source code as output?

1055


What is the difference between fread and fwrite function?

1032


What is preprocessor with example?

997


Do pointers need to be initialized?

1016


What is hashing in c?

1095