0
Anyone may please tell me why if condition is not working in this code .
Thank who will check it or help me ☺️ https://code.sololearn.com/cKm4q8uqUTpI/?ref=app
4 Réponses
+ 4
Consider this part for example:
age < 20 && age > 25
A suspect cannot be younger than 20 AND older than 25 at the same time.
I think you wanted to write
age > 20 && age < 25
Similarly for height.
+ 2
Yes sir you are exactly right . How fool i am . Sorry . I will try to not do such type of mistakes . Thank you sir .
+ 1
G'day Abhay mishra you are very close to having it work.
Your line:
char name[0] ;
Creates a character variable called name, but you don't give any size bigger than zero, so it won't store the string. Could you change the [0] to [20] and see how it works?
+ 1
Actually sir i didn't understand this concept till now . May you please tell me one thing is it the concept of topic string or anything else ? Because in my institution this concept have not taught till now as we completed if-else condition .