Why is islower function always showing 0 no matter what character I use? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
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 Antworten
+ 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