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

hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

2141


How arrays can be passed to a user defined function

973


What is the use of bitwise operator?

1075


Can a void pointer point to a function?

974


How do you determine whether to use a stream function or a low-level function?

1087


Explain goto?

1100


Why n++ execute faster than n+1 ?

2858


There seem to be a few missing operators ..

1011


What do the functions atoi(), itoa() and gcvt() do?

1142


Explain pointer. What are function pointers in C?

1021


How are Structure passing and returning implemented by the complier?

1118


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1178


What are the advantages and disadvantages of c language?

969


What is the maximum no. of arguments that can be given in a command line in C.?

1094


Is there any demerits of using pointer?

1022