Napisałem poniższe programy bez uwzględnienia #include <ctype.h>
. Jestem w stanie wykonać program. Gdzie są deklarowane te prototypy? Używam gcc
.Bez uwzględnienia #include <ctype.h>
1.
#include <stdio.h>
int main()
{
if(isalnum(';'))
printf("character ; is not alphanumeric");
if(isalnum('A'))
printf("character A is alphanumeric ");
return 0;
}
2.
#include <stdio.h>
int main()
{
printf("Lower case of A is %c \n", tolower('A'));
printf("Lower case of 9 is %c \n", tolower('9'));
printf("Lower case of g is %c \n", tolower('g'));
printf("ASCII value of B is %d \n", toascii('B'));
printf("Upper case of g is %c \n", toupper('g'));
return 0;
}
spróbuj przekazać nieprawidłowe argumenty, kompilator może wyprowadzić miejsce, gdzie deklarowany jest prototyp. – XAder
Jakiego kompilatora używasz? Która wersja C? –
'if (isalnum (';')) printf (" nie jest alfanumeryczny ");'? Jesteś pewny? – Benoit