Preprocessor

S

sangeeta chowdhary

Hi,

I tried code : -

#include<stdio.h>

int main()
{
#ifdef NOTE
/* unterminated comment
int a;
a=10;
#else
int a;
a=20;
#endif

printf("%d\n",a);
return 0;
}

ifdef portion will not compile as condition is false,but when program
is compiled it is displaying
error - unterminated comment,now how this error is being displayed,who
is checking for these
kind of errors?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top