use printf without semicolon

Discussion in 'C' started by Ziaur Rahman, Sep 29, 2007.

  1. Ziaur Rahman

    Ziaur Rahman New Member

    Joined:
    Oct 22, 2006
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Pune
    Code:
    #include<stdio.h>
    main()
    {
          if(printf("Ziaur Rahman"))
          {
          }
    }
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    So what the hell did you gain? You typed more characters than if you had just used the semicolon. Things like this are well known by professionals. You may generally presume that such an exercise is merely silly and a waste of time and effort.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice