hi!
can we use any function to display our input
without using a " printf " function? does c support such this
possibilities?
... 6 2725 va*****@gmail.com wrote:
hi!
can we use any function to display our input
without using a " printf " function? does c support such this
possibilities?
..
Yes. Use the standard fprintf(), vprintf(), vfprintf(), puts(),
fputs(), putchar(), putc(), fputc(), or write your own.
On Nov 20, 11:23 am, "varo...@gmail.com" <varo...@gmail.comwrote:
hi!
can we use any function to display our input
without using a " printf " function? does c support such this
possibilities?
..
Standard C includes puts, fprintf, fputs, putchar and fputc which can
be used to print text into stdout or other specifi file streams.
Rg
santosh wrote:
>
Yes. Use the standard fprintf(), vprintf(), vfprintf(), puts(),
fputs(), putchar(), putc(), fputc(), or write your own.
could you show me an example using
your own function?
Je-Givara wrote:
santosh wrote:
Yes. Use the standard fprintf(), vprintf(), vfprintf(), puts(),
fputs(), putchar(), putc(), fputc(), or write your own.
could you show me an example using
your own function?
As such custom functions are usually very platform specific, it would
not be topical for this group. However, if you _really_ want to see
such code, try asking Mr. Navia nicely. He's in a very OT mood right
now. :-) va*****@gmail.com wrote
hi!
can we use any function to display our input
without using a " printf " function? does c support such this
possibilities?
Yes, as many people know this topic is covered in detail in The C
Programming Language (2nd Edition) by Brian W. Kernighan, and Dennis
Ritchie, there is an example in the book and they explain how this
accomplished using a function.
Neil
void minprintf (char *fmt, ... )
{
va_list ap;
char *p, *sval;
int ival;
double dval;
va_start (ap, fmt);
for(p=fmt; *p;p++)
{
if (*p != '%')
{
putchar (*p);
continue;
}
switch (*++p)
{
case 'd': ival = va_arg(ap,int);
printf("%d",ival);
break;
case 'f': dval = va_arg (ap, double);
printf("%f",dval);
break;
case 's': for (sval = va_arg(ap,char *);*sval;sval++)
putchar (*sval);
break;
default: putchar(*p);
break;
}
}
va_end(ap);
}
void main()
{
.....
}
so this a code and what shall we write in the Main program? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mark Schneider |
last post by:
I'm trying to avoid using <table> for formatting purposes where other,
reasonable means exist. I'm stuck trying to find a way to find an
equivalent for the code below.
<table align="center">...
|
by: bborden |
last post by:
Novice Access programmer here.
I would like to display an image using the Toolbox Image object by
calling the images file name using:
=fPictureFiles(!!,1)
in the Picture control.
Below...
|
by: LaBird |
last post by:
Dear all,
I would like to ask if there is any C function that accept one
keystroke as input, without printing out what the user presses
and without the need to press enter as delimiter....
|
by: mg |
last post by:
I need to first open WebForm2 from WebForm1 and then
close WebForm1 without the end user having to press an OK
button before the close can occur.
For example, possibly
...
|
by: ceeques |
last post by:
Hi
I am a novice in C. Could you guys help me solve this problem -
I need to convert integer(and /short) to string without using sprintf
(I dont have standard libray stdio.h).
for...
|
by: PRESENT321 |
last post by:
I have a form that appears several times on a page, and would rather
not assign IDs.
Is there a way to have my validation function focus() a text input
without IDs?
www.osbornewood.com
Search...
|
by: ragav |
last post by:
How can i print anything without using printf( ) or anyother inbuilt
function calls??
|
by: patelxxx |
last post by:
Problem: I am trying to input my name in a text box and I click on transfer and I want the name to appear on the same page (i.e. in another form). How is this done?
<BODY>
<HTML>
<form...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |