473,508 Members | 2,233 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print without using any inbuilt function?

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

Dec 8 '06 #1
13 3303
"ragav" <sr***************@gmail.comwrites:
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_Keith) ks***@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.
Dec 8 '06 #2
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.

Dec 8 '06 #3
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
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Dec 8 '06 #4
"santosh" <sa*********@gmail.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
Dec 8 '06 #5
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
Dec 8 '06 #6
In article <11**********************@80g2000cwy.googlegroups. com>,
ragav <sr***************@gmail.comwrote:
>How can i print anything without using printf( ) or anyother inbuilt
function calls??
You could use FORTRAN.

-- Richard

--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Dec 8 '06 #7

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

Dec 8 '06 #8
Richard Bos wrote:
"santosh" <sa*********@gmail.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.

Dec 8 '06 #9

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

Dec 8 '06 #10
On 8 Dec 2006 08:09:02 -0800, in comp.lang.c , "santosh"
<sa*********@gmail.comwrote:
>Richard Bos wrote:
>"santosh" <sa*********@gmail.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
Dec 9 '06 #11
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.

Dec 9 '06 #12
In article <94********************************@4ax.com>,
Mark McIntyre <ma**********@spamcop.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.

Dec 9 '06 #13
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)
Dec 14 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4912
by: Geert-Pieter Hof | last post by:
Hello, I'm using the Printer.PaintPicture method to print an image and I want to set the job title that the print manager will show. I already found out that this can be done by using the...
12
2378
by: Michael Foord | last post by:
Here's a little oddity with 'print' being a reserved word... >>> class thing: pass >>> something = thing() >>> something.print = 3 SyntaxError: invalid syntax >>> print something.__dict__...
0
994
by: km | last post by:
Hi all, I which context is the inbuilt function buffer() used ? regards, KM
14
2882
by: Marcin Ciura | last post by:
Here is a pre-PEP about print that I wrote recently. Please let me know what is the community's opinion on it. Cheers, Marcin PEP: XXX Title: Print Without Intervening Space Version:...
2
16024
by: Raja | last post by:
IS there any inbuilt decimal to binary conversion function in C++
4
7710
by: Russell | last post by:
I have an assignment that I have to complete. I have to write a windows app in C#. Here is the spec: 1/ Date Comparison Build a program that will find the number of days between two dates. You...
4
2343
by: rom | last post by:
I need to print a html table when the user clicks on a key. the problem is that i don't want the printer dialog box to appear. i guess this is impossible in javascript so i think to create an...
43
1866
by: shaanxxx | last post by:
if u give cordinates to programme at run time and want a line to be drawn.. how to do this in c without usin any graphics function? like x1,y1 and x2,y2 and lines should be drawn from the 1st...
12
3510
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.