Why is islower function always showing 0 no matter what character I use? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Why is islower function always showing 0 no matter what character I use?

In documentation, they specified dat if islower accepts a lowercase character, the output number should be more than 0 which is not the case with the program attached to it. https://code.sololearn.com/c617AzNt8975/?ref=app

12th Aug 2021, 3:53 AM
Harkeerat Singh
Harkeerat Singh - avatar
4 Réponses
+ 5
Give single quotes to the char like t='p'.
12th Aug 2021, 4:12 AM
v@msi😉
v@msi😉 - avatar
+ 2
In C, 'p' and "p" both are different. Double quotes represent array which ends with a null character.
13th Aug 2021, 4:22 AM
v@msi😉
v@msi😉 - avatar
+ 1
Thank you so much
13th Aug 2021, 2:58 PM
Harkeerat Singh
Harkeerat Singh - avatar
0
Thanks, it worked. But what's the intuition behind it??
13th Aug 2021, 4:13 AM
Harkeerat Singh
Harkeerat Singh - avatar