greetings folks,


#include<stdio.h>
#define T t
void main()
{
char T = 'T';
printf("\n%c\t%c\n",T,t);
}

just check what is the output of this program
and puhleease tell me reason whyit happens so??
:rolleyes:

greetings folks,


#include<stdio.h>
#define T t
void main()
{
char T = 'T';
printf("\n%c\t%c\n",T,t);
}

just check what is the output of this program
and puhleease tell me reason whyit happens so??
:rolleyes:

compile and run that program, then you will see for yourself what the output is. Why does it happen? Because T and t are both the same thing. The #define statement at the top of the program tells the compiler that T is just another name for t.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.