私は#include <ctype.h>
を含まない下記のプログラムを書いています。私はプログラムを実行することができます。これらのプロトタイプはどこに宣言されていますか?私はgcc
を使用しています。あなたのコードで#includeを含まない
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;
}
無効な引数を渡そうとすると、コンパイラがプロトタイプが宣言されている場所を出力することがあります。 – XAder
どのコンパイラを使用していますか?どのバージョンのC? –
'if(isalnum( ';'))printf("は英数字ではありません ");'?本気ですか? – Benoit