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 the translation phases used in c language?

637


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

1741


What does a pointer variable always consist of?

666


What is the purpose of macro in C language?

664


What is pivot in c?

569






What are variables and it what way is it different from constants?

787


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

649


What is a null pointer in c?

598


What is modeling?

648


What are the two types of structure?

579


List some applications of c programming language?

553


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1520


Is printf a keyword?

762


How does free() know explain how much memory to release?

621


main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }

921