0

How to check if one variable lies in an array variable?

I want to check whether var1 = 2; lies in Array variable var2[3]={'1','2','3'};

5th May 2021, 3:22 AM
Nepali Keto
Nepali Keto - avatar
4 Answers
+ 1
Loop through the array in a function and use a condition like if arr[i] == 2/3/etc return 1; return 0;
5th May 2021, 3:43 AM
TOLUENE
TOLUENE - avatar
0
Md Sayed I am new in C so would you please write complete program ....
5th May 2021, 3:52 AM
Nepali Keto
Nepali Keto - avatar
0
Md Sayed Thank you so much ❤️❤️
5th May 2021, 4:09 AM
Nepali Keto
Nepali Keto - avatar