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...


wat is the difference between a definition and declaration?
float y;---it looks like a declaration..but it s a
definition.how?someone explain

Answers were Sorted based on User's Feedback



wat is the difference between a definition and declaration? float y;---it looks like a declaration...

Answer / kantilal

the diff b/w defination and declaration is
defination is allocating memory to the variable
ddeclaration is telling what type of variable it is and not
allocating memory for it

float y is defination as compiler allcates memory for it
if you give as extern float y it is declaration

Is This Answer Correct ?    30 Yes 0 No

wat is the difference between a definition and declaration? float y;---it looks like a declaration...

Answer / vignesh1988i

this is declaration as well as definition....
according to me.,
DECLARATION here means that for some maniplation inside the
program we are going to use that variable y... but what is y
we want to tell the compiler so we are giving a new
DEFINITION to the alphabet as float DATA TYPE and thus we
are making the full variable


thank u

Is This Answer Correct ?    4 Yes 0 No

wat is the difference between a definition and declaration? float y;---it looks like a declaration...

Answer / dally

defination is allocating memory to the variable.
but declaration is telling what type of variable it is and
not allocating memory for it.

Ex.int i;
extern int b;

here int i is definition because variable of value is
allocated in memory.
but variable b declared as int variable but memory is not
allocated for this.

float y is defination as compiler allcates memory for it
if you give as extern float y it is declaration

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More C Interview Questions

what is the maximum no. of bytes calloc can allocate

4 Answers   Mphasis,


How many types of arrays are there in c?

0 Answers  


int i=~0; uint j=(uint)i; j++; printf(“%d”,j);

1 Answers  


define string ?

0 Answers  


we have a 3litres jug and a 5 litres jug and no measures on them. using these two jugs how can we measure 4 litres of water?

2 Answers   Convergys,


write a program that print itself even if the source file is deleted?

2 Answers  


hello everybody can we change a the adress of a variabl i mean can i put for exemple for a int *p: &p=6 ?????????

1 Answers  


What is typedef struct in c?

0 Answers  


main is a predefined or user define function if user defined why? if predefined whay?

12 Answers   TCS,


char ch=10;printf("%d",ch);what is the output

14 Answers   Accenture,


Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

0 Answers  


#include main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }

6 Answers   ME,


Categories