• Array is the set of an multiple values where as variable can store single value at a time.
• The difference between the definition of array and ordinary variable is the, array is always declared, initialized, and accessed using subscript whereas ordinary variable do not have any subscript.
• The syntax for ordinary variable definition is data_type v1, v2, ….;
• And the syntax for array variable is data_type v1[N1],v2[N2],…; where v1,v2 are name of variable and N1, N2 are the integer constants indicating the maximum size of array.
• The difference between the definition of array and ordinary variable is the, array is always declared, initialized, and accessed using subscript whereas ordinary variable do not have any subscript.
• The syntax for ordinary variable definition is data_type v1, v2, ….;
• And the syntax for array variable is data_type v1[N1],v2[N2],…; where v1,v2 are name of variable and N1, N2 are the integer constants indicating the maximum size of array.
Array have consecutive memory locations...
ReplyDeleteTwo or more variables may or may not have consecutive memory locations!!!
Good..Thanks....
ReplyDeletethanks much more if u can
ReplyDeletethanx dude it really workout for xams.
ReplyDeletethanks a lot. it really helped in my exams. very good explanation.
ReplyDeletethanks a lot. it really helped in my exams. very good explanation.
ReplyDeleteThanx u guys. Completely helpful for my internal exam
ReplyDeleteThanks a lot . I helps me for my internals.
ReplyDeleteThank you so much .it is very helpful to me
ReplyDeleteTum shut Karo because is vishya
ReplyDeleteScreen mein display NAHI aye
Thanks very useful
ReplyDeleteUseful
ReplyDeleteThank you 💕💕
ReplyDeleteVariable have single box in memory of sigle type..where as array have larget box of same data type.
ReplyDelete