what is the difference between declaration ,defenetion and
initialization of a variable?

Answer Posted / prakash

Declaration: int a;(does not allocate memory)
Initialisation: a=5;(value is assigned for 'a')
Definition: int a=5;(allocates memory)

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is getch c?

1041


What is string function in c?

725


I heard that you have to include stdio.h before calling printf. Why?

803


Are there constructors in c?

763


What is difference between structure and union in c?

724


Explain the advantages and disadvantages of macros.

831


What are the properties of union in c?

802


What are the types of pointers in c?

730


How do I use strcmp?

823


Why is c so powerful?

877


Explain how do you determine the length of a string value that was stored in a variable?

895


In which header file is the null macro defined?

1099


What is the difference between malloc() and calloc()?

1017


Why c is a mother language?

736


What is adt in c programming?

840