From c and c++ topic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shyam25nayak
    New Member
    • Jul 2020
    • 1

    From c and c++ topic

    What could be smallest programs in the C and C++ in terms of bytes?
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Strange question, bytes of source code to bytes of executable code?

    Starting with main what do you think it might look like?

    Comment

    • dev7060
      Recognized Expert Contributor
      • Mar 2017
      • 656

      #3
      What could be smallest programs in the C and C++ in terms of bytes?
      What do you mean exactly? "Smallest programs" in terms of storage space? Is the question related to optimization?

      Technically saying, the smallest program would be
      Code:
      main(){}
      and does nothing.

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        Technically speaking, you've missed int off the front of that 😄

        Comment

        • dev7060
          Recognized Expert Contributor
          • Mar 2017
          • 656

          #5
          Lol I did that on purpose to make it look like the smallest possible one-liner. https://bytes.com/topic/c/answers/97...am#post3825313

          Comment

          Working...