if i declare dynamic array upto !4 index and i was intilize the 12 index. so kya 2 index uninitilize rh gye hai too kya unse memory par effect hooga.jaise ke static array me hoota hai.
In Linear search, we simply traverse the list completely and match each element of the list with the item whose location is to be found. If the match is found, then the location of the item is returned; otherwise, the algorithm returns NULL.
Linear Search -In this search ,searchkey teraverse whole list or array if searchkey found any location then print the location. Eg sk is found by 5th location. Other wise sk is not found in this list. Over view If(sk==array[i]) Print search key location. else print not found