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

I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

0 Answers   Oracle,


dynamically allocate memory for linear array of n integers,store some elements in it and find some of them

1 Answers  


Write a C program to get the desired output. 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 . . . 1 n..............n 1 Note: n is a positive integer entered by the user.

4 Answers  


What is c basic?

0 Answers  


In a byte, what is the maximum decimal number that you can accommodate?

0 Answers  






hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

0 Answers   HCL,


how to print "hai" in c?

13 Answers   TCS,


Compare interpreters and compilers.

0 Answers  


How can I sort a linked list?

0 Answers  


what are bit fields? What is the use of bit fields in a structure declaration?

0 Answers   Flextronics, TISL, Virtusa,


What does c mean before a date?

0 Answers  


You have given 2 array. You need to find whether they will create the same BST or not. For example: Array1:10 5 20 15 30 Array2:10 20 15 30 5 Result: True Array1:10 5 20 15 30 Array2:10 15 20 30 5 Result: False One Approach is Pretty Clear by creating BST O(nlogn) then checking two tree for identical O(N) overall O(nlogn) ..we need there exist O(N) Time & O(1) Space also without extra space .Algorithm ?? DevoCoder guest Posted 3 months ago # #define true 1 #define false 0 int check(int a1[],int a2[],int n1,int n2) { int i; //n1 size of array a1[] and n2 size of a2[] if(n1!=n2) return false; //n1 and n2 must be same for(i=0;i<n1-1;i++) { if( !( (a1[i]>a1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }

0 Answers   Facebook,


Categories