Preprocessor

Discussion in 'C Programming' started by sangeeta chowdhary, Jun 30, 2010.

  1. 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?
    sangeeta chowdhary, Jun 30, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris P
    Replies:
    0
    Views:
    439
    Chris P
    Oct 28, 2003
  2. The Weiss Family

    VHDL Preprocessor

    The Weiss Family, Jul 14, 2004, in forum: VHDL
    Replies:
    2
    Views:
    3,217
    The Weiss Family
    Jul 14, 2004
  3. =?Utf-8?B?SSBhbSBTYW0=?=

    C# Preprocessor

    =?Utf-8?B?SSBhbSBTYW0=?=, Mar 13, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,576
    =?Utf-8?B?SSBhbSBTYW0=?=
    Mar 13, 2005
  4. Replies:
    0
    Views:
    2,670
  5. Cronus
    Replies:
    1
    Views:
    667
    Paul Mensonides
    Jul 15, 2004
Loading...

Share This Page