Linear search doubt

int A[4]={4,3,2,6}
for linear search like every time array size and elements are known to us??

Hi @manishayadav1360_c0939b9a17f994ff,
Yes, it is necessary.

like can we not put array values with our own by using int n,cin>>n so that we can make the array and put values after running the code and then linear search will apply.

yehh bhii tohh possible h na hrr baar array given ho its not neccessary am i right please tell??

@manishayadav1360_c0939b9a17f994ff,
Yes, you are right. You can do it in both ways.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.