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

Answer Posted / siddiqui mohd. faisal

declaration : int a;
declaration means here a is declared as integer variable
initialization : int a = 5;
initialization is whatever you have declared give that
variable some value
definition : int a;
definition is whatever variable you have declared give it's
datatype as here a is declared as integer variable

Is This Answer Correct ?    32 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are external variables in c?

546


Explain how can I make sure that my program is the only one accessing a file?

625


Are c and c++ the same?

627


explain what is fifo?

634


Write a program to reverse a given number in c language?

620






Give basis knowledge of web designing ...

1574


Explain what is the difference between text files and binary files?

618


Explain the difference between getch() and getche() in c?

565


Are bit fields portable?

679


What is function pointer c?

586


Write a program to print “hello world” without using semicolon?

672


Write a code to determine the total number of stops an elevator would take to serve N number of people.

728


what will be maximum number of comparisons when number of elements are given?

1410


Is main an identifier in c?

601


Explain what are reserved words?

635