Print without using any inbuilt function?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ragav

    Print without using any inbuilt function?

    How can i print anything without using printf( ) or anyother inbuilt
    function calls??

  • Keith Thompson

    #2
    Re: Print without using any inbuilt function?

    "ragav" <sri.ragaventhi rar@gmail.comwr ites:
    How can i print anything without using printf( ) or anyother inbuilt
    function calls??
    Use a pen and paper.

    Questions of the form "How can I do X without using Y", where Y is the
    obvious way to do X, are almost invariably homework.

    --
    Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.

    Comment

    • santosh

      #3
      Re: Print without using any inbuilt function?

      ragav wrote:
      How can i print anything without using printf( ) or anyother inbuilt
      function calls??
      printf() is not in-built in the C language. There's no portable answer
      to your question. Under _certain_ systems, you may be able to print to
      the display by writing character code values into the video memory, but
      ask further questions in this regard to more system specific groups.

      Comment

      • Richard Heathfield

        #4
        Re: Print without using any inbuilt function?

        ragav said:
        How can i print anything without using printf( ) or anyother inbuilt
        function calls??
        printf( ) isn't an inbuilt function call. It's just a function call.

        If you don't want to use printf, use vprintf or vfprintf or puts or putchar
        or putc or fputc or even fwrite. None of these are inbuilt function calls.

        What's wrong with printf, anyway? Don't you like it?

        --
        Richard Heathfield
        "Usenet is a strange place" - dmr 29/7/1999

        email: rjh at the above domain, - www.

        Comment

        • Richard Bos

          #5
          Re: Print without using any inbuilt function?

          "santosh" <santosh.k83@gm ail.comwrote:
          ragav wrote:
          How can i print anything without using printf( ) or anyother inbuilt
          function calls??
          >
          printf() is not in-built in the C language.
          Yes, it is. It's defined in the ISO C Standard, which: "specifies the
          form and establishes the interpretation of programs written in the C
          programming language."

          Richard

          Comment

          • pete

            #6
            Re: Print without using any inbuilt function?

            ragav wrote:
            >
            How can i print anything without using printf( ) or anyother inbuilt
            function calls??
            You could use the putc macro if there is one,
            but in order to ensure that putc is a macro
            and that it also does not make a call to a built in function,
            you would also need a genie.

            --
            pete

            Comment

            • Richard Tobin

              #7
              Re: Print without using any inbuilt function?

              In article <1165570874.213 280.136100@80g2 000cwy.googlegr oups.com>,
              ragav <sri.ragaventhi rar@gmail.comwr ote:
              >How can i print anything without using printf( ) or anyother inbuilt
              >function calls??
              You could use FORTRAN.

              -- Richard



              --
              "Considerat ion shall be given to the need for as many as 32 characters
              in some alphabets" - X3.4, 1963.

              Comment

              • soccertl

                #8
                Re: Print without using any inbuilt function?


                ragav wrote:
                How can i print anything without using printf( ) or anyother inbuilt
                function calls??
                Write an assembly module.

                Comment

                • santosh

                  #9
                  Re: Print without using any inbuilt function?

                  Richard Bos wrote:
                  "santosh" <santosh.k83@gm ail.comwrote:
                  >
                  ragav wrote:
                  How can i print anything without using printf( ) or anyother inbuilt
                  function calls??
                  printf() is not in-built in the C language.
                  >
                  Yes, it is. It's defined in the ISO C Standard, which: "specifies the
                  form and establishes the interpretation of programs written in the C
                  programming language."
                  Not for freestanding implementations .

                  Comment

                  • ais523

                    #10
                    Re: Print without using any inbuilt function?


                    ragav wrote:
                    How can i print anything without using printf( ) or anyother inbuilt
                    function calls??
                    It depends on what you mean by 'print'. The following program:

                    #error Hello, world!

                    will generate a diagnostic when compiled with a conforming C compiler;
                    this diagnostic may quite possibly meet your definition of 'print'.

                    --
                    ais523

                    Comment

                    • Mark McIntyre

                      #11
                      Re: Print without using any inbuilt function?

                      On 8 Dec 2006 08:09:02 -0800, in comp.lang.c , "santosh"
                      <santosh.k83@gm ail.comwrote:
                      >Richard Bos wrote:
                      >"santosh" <santosh.k83@gm ail.comwrote:
                      >>
                      ragav wrote:
                      How can i print anything without using printf( ) or anyother inbuilt
                      function calls??
                      >
                      printf() is not in-built in the C language.
                      >>
                      >Yes, it is. It's defined in the ISO C Standard, which: "specifies the
                      >form and establishes the interpretation of programs written in the C
                      >programming language."
                      >
                      >Not for freestanding implementations .
                      Its still part of the C language definition..

                      Also, how likely do you think it is that the OP is working on a
                      freestanding implemetation?
                      --
                      Mark McIntyre

                      "Debugging is twice as hard as writing the code in the first place.
                      Therefore, if you write the code as cleverly as possible, you are,
                      by definition, not smart enough to debug it."
                      --Brian Kernighan

                      Comment

                      • santosh

                        #12
                        Re: Print without using any inbuilt function?

                        Mark McIntyre wrote:
                        santosh wrote:
                        Richard Bos wrote:
                        santosh wrote:
                        ragav wrote:
                        How can i print anything without using printf( ) or anyother inbuilt
                        function calls??

                        printf() is not in-built in the C language.
                        >
                        Yes, it is. It's defined in the ISO C Standard, which: "specifies the
                        form and establishes the interpretation of programs written in the C
                        programming language."
                        Not for freestanding implementations .
                        >
                        Its still part of the C language definition..
                        Yes. I assumed that the OP meant by word 'inbuilt' as to being built
                        into the compiler proper. Which is why I answered as I did. Looking
                        back, I certainly expressed it the wrong way.

                        Comment

                        • Kenny McCormack

                          #13
                          Tuning the answer to the receiver (Was: Print without using any inbuilt function?)

                          In article <949ln2951cnpen p2seu9f2206tph8 pdiem@4ax.com>,
                          Mark McIntyre <markmcintyre@s pamcop.netwrote :
                          ....
                          >Also, how likely do you think it is that the OP is working on a
                          >freestanding implemetation?
                          But, alas, the sentiment behind that statement goes for 99% of the
                          "advice" given in this ng. The typical "I just want my Windows GUI app
                          that was assigned to me as homework program to work so I can pass this
                          da** class" poster generally could not care less about the sort of
                          "Well, the standard says..." kind of advice that the regs here dish out.

                          But we do it anyway. So, let's not be hypocritical about it.

                          Comment

                          • Neil

                            #14
                            Re: Print without using any inbuilt function?

                            Richard Heathfield wrote:
                            ragav said:
                            >
                            >How can i print anything without using printf( ) or anyother inbuilt
                            >function calls??
                            >
                            printf( ) isn't an inbuilt function call. It's just a function call.
                            >
                            If you don't want to use printf, use vprintf or vfprintf or puts or putchar
                            or putc or fputc or even fwrite. None of these are inbuilt function calls.
                            >
                            What's wrong with printf, anyway? Don't you like it?
                            >
                            One of 2 reasons
                            01) Homework
                            10) 8 bit compiler (printf is big)

                            Comment

                            Working...