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
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 |
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 |
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 |
What is bin sh c?
Can you think of a logic behind the game minesweeper.
write a program in c language to print your bio-data on the screen by using functions.
6 Answers College School Exams Tests, IBM,
What is a substring in c?
how should functions be apportioned among source files?
write a c program to change only the 3rd bit of the particular number such that other bits are not affected.. if bitnum=10(say.. it can be any no..
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
write a program to swap two variables a=5 , b= 10 without using third variable
how to generate sparse matrix in c
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
Eight queens puzzle
What is call by value in c?