Tuesday 24 July 2012

nesting of macros in c language with output

How to write code for nesting of macros in c language
#include
#define ISLOWER(c) (c>=97&&c<=122) #define ISUPPER(c) (c>=65&&c<=90)
#define ISALPHA(c) ISLOWER(c) || ISUPPER(c)
int main()
{
char chr;
printf("Enter a character:\n");
scanf("%c",&chr);


if (ISALPHA(chr) )

{

printf("%c is an alphabetical character.\n",chr);

}

else

{
printf("%c is not an alphabetical character.\n",chr);
}

return 0;
}
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: