This blog is under construction

Sunday, 12 January 2014

#ifdef, #ifndef and #endif directives in C

#ifdef
If the named macro is defined, then the code between #ifdef and #endif will be compiled.

#ifndef
If the named macro is not defined, then the code between #ifndef and #endif will be compiled.


#ifdef, #ifndef and #endif example in C
 
  #include <stdio.h>
  #define NAME "Raj"

  int main() {

        #ifdef NAME
                printf("#ifdef: Value of NAME is %s\n", NAME);
        #endif

        #ifndef VAL
                printf("#ifndef: macro VAL is not defined\n");
        #endif
        return 0;
  }


  Output:
  jp@jp-VirtualBox:~/$ ./a.out
  #ifdef: Value of NAME is Raj
  #ifndef: macro VAL is not defined


In the above program, macro NAME is defined.  So, the code between #ifdef and #endif is executed. Similarly, the code between #ifndef and #endif is executed as the macro VAL is not defined.



13 comments:

  1. To get more exampls of "c programming" visit http://www.cprogramming-bd.com/c_page1.aspx#c%20programming

    ReplyDelete
    Replies
    1. Hello Everyone !

      USA SSN Leads/Dead Fullz available, along with Driving License/ID Number with good connectivity.

      All SSN's are Tested & Verified.

      **DETAILS IN LEADS/FULLZ**

      ->FULL NAME
      ->SSN
      ->DATE OF BIRTH
      ->DRIVING LICENSE NUMBER
      ->ADDRESS WITH ZIP
      ->PHONE NUMBER, EMAIL
      ->EMPLOYEE DETAILS

      *Price for SSN lead $2
      *You can ask for sample before any deal
      *If you buy in bulk, will give you discount
      *Sampling is just for serious buyers

      ->Hope for the long term business
      ->You can buy for your specific states too

      **Contact 24/7**

      Whatsapp > +923172721122

      Email > leads.sellers1212@gmail.com

      Telegram > @leadsupplier

      ICQ > 752822040

      Delete
  2. Nice article admin thanks for share your atricle keep share your knowledge i am waiting for your new post check mens winter jackets polo shirts kindly review and reply me

    ReplyDelete
  3. nice stuff & nice blog..
    feel happy to visit your blog..
    i really apprecite it..

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Hello Everyone !

    USA SSN Leads/Dead Fullz available, along with Driving License/ID Number with good connectivity.

    All SSN's are Tested & Verified.

    **DETAILS IN LEADS/FULLZ**

    ->FULL NAME
    ->SSN
    ->DATE OF BIRTH
    ->DRIVING LICENSE NUMBER
    ->ADDRESS WITH ZIP
    ->PHONE NUMBER, EMAIL
    ->EMPLOYEE DETAILS

    *Price for SSN lead $2
    *You can ask for sample before any deal
    *If you buy in bulk, will give you discount
    *Sampling is just for serious buyers

    ->Hope for the long term business
    ->You can buy for your specific states too

    **Contact 24/7**

    Whatsapp > +923172721122

    Email > leads.sellers1212@gmail.com

    Telegram > @leadsupplier

    ICQ > 752822040

    ReplyDelete
  6. Dell Laptop Repair Center in Noida is no.1 service center which provides door to door services in or its nearby areas. We have expert, technicians who can repair your laptop at your home. . Call us: 9891868324

    ReplyDelete
  7. **SELLING SSN+DOB FULLZ**

    CONTACT 24/7
    Telegram > @leadsupplier
    ICQ > 752822040
    Email > leads.sellers1212@gmail.com

    >>1$ each without DL/ID number
    >>2$ each with DL
    >>5$ each for premium (also included relative info)

    Price will be reduce in Bulk order

    FORMAT OF LEADS/FULLZ/PROS

    ->FULL NAME
    ->SSN
    ->DATE OF BIRTH
    ->DRIVING LICENSE NUMBER WITH EXPIRY DATE
    ->COMPLETE ADDRESS
    ->PHONE NUMBER, EMAIL, I.P ADDRESS
    ->EMPLOYMENT DETAILS
    ->REALTIONSHIP DETAILS
    ->MORTGAGE INFO
    ->BANK ACCOUNT DETAILS

    >All Leads are Spammed & Verified.
    >Fresh spammed data of USA Credit Bureau
    >Good credit Scores, 700 minimum scores
    >Invalid info found, will be replaced.
    >Payment mode BTC, ETH, LTC, PayPal, USDT & PERFECT MONEY

    ''OTHER GADGETS PROVIDING''

    >SSN+DOB Fullz
    >CC with CVV
    >Photo ID's
    >Dead Fullz
    >Carding Tutorials
    >Hacking Tutorials
    >SMTP Linux Root
    >DUMPS with pins track 1 and 2
    >Sock Tools
    >Server I.P's
    >HQ Emails with passwords

    Contact 24/7

    Email > leads.sellers1212@gmail.com
    Telegram > @leadsupplier
    ICQ > 752822040

    ReplyDelete
  8. I like what you guys are up too. Such smart work and reporting! Carry on the superb works guys I’ve incorporated you guys to my blogroll. I think it will improve the value of my website :) app entwickler berlin

    ReplyDelete

  9. FRESH&VALID SPAMMED USA DATABASE/FULLZ/LEADS

    ****Contact****
    *ICQ :748957107
    *Gmail :fullzvendor111@gmail.com
    *Telegram :@James307
    *Skype : Jamesvince$
    <><><><><><><>
    USA SSN FULLZ WITH ALL PERSONAL DATA+DL NUMBER
    -FULLZ FOR PUA & SBA
    -FULLZ FOR TAX REFUND
    $2 for each fullz/lead with DL num
    $1 for each SSN+DOB
    $5 for each with Premium info
    ID's Photos For any state (back & front)
    (Price can be negotiable if order in bulk)
    <><><><><><><><><><><>
    +High quality and connectivity
    +If you have any trust issue before any deal you may get few to test
    +Every leads are well checked and available 24 hours
    +Fully cooperate with clients
    +Any invalid info found will be replaced
    +Payment Method(BTC,USDT,ETH,LTC & PAYPAL)
    +Fullz available according to demand too i.e (format,specific state,specific zip code & specifc name etc..)
    <><><><><><><><><><>
    +US cc Fullz
    +(Dead Fullz)
    +(Email leads with Password)
    +(Dumps track 1 & 2 with pin and without pin)
    +Hacking & Carding Tutorials
    +Smtp Linux
    +Safe Sock
    +Server I.P's
    +HQ Emails with passwords
    <><><><><><><><>
    *Let's do a long term business with good profit
    *Contact for more details & deal

    ReplyDelete
  10. I really apricate your well written article. A lot of people here to read your interesting article. Thanks for sharing this article. Now it's time to avail Custom Kraft Boxes for more information.

    ReplyDelete