Hi, can anyone tell me where I can see the function definitons of functions declared in stdio.h like printf() and putchar()? I am curious as to how these functions actually work.
Thanks!
Hi, can anyone tell me where I can see the function definitons of functions declared in stdio.h like printf() and putchar()? I am curious as to how these functions actually work.
Thanks!
here are a few
islower - find out if the argument is lowecase
isupper - finds if argument is upper
isdigit - finds if argument is digit
isalpha - fins if argument is a letter
isalnum - find wether its upper, lower, or a number
isxdigit - finds if argument is hexadeciaml
toupper- makes a char upper
tolower - makes a char lowercase
isspace - finds if charector is a white space (space, tab, enter and so on)
ispunct - finds if it is puncuation
isprint - finds it argument is any printing character
isgraph finds if it is a printing character other then a space
atof - converts argument to a double
atoi - converts argument to int
atol - converts argument to a long
gets - reads character from keyboard into variable
putchar - prints a single char
getchar - reads in a single char
puts - prints a string of char's
sprintf - same as printf for arrays
strcpy - copies its second argument into first argument
strcat - adds second argument to the end of the first argument
strcmp - compares first string to 2nd
strchr - searchs for first occurrence of a sharacter in a string
there are assloads of them, if this is the type of thing you are looking for, if not, sorry ;-)
thanks, but actually I meant I wanted to know what the contents of the function definitions are...i.e-
printf() {
}
I would like to know what is inside the {}.
:-)
oooh, cant help ya there sorry
From the Visual C++ CRT Source Files:
Code:/*** *int printf(format, ...) - print formatted data * *Purpose: * Prints formatted data on stdout using the format string to * format data and getting as many arguments as called for * Uses temporary buffering to improve efficiency. * _output does the real work here * *Entry: * char *format - format string to control data format/number of arguments * followed by list of arguments, number and type controlled by * format string * *Exit: * returns number of characters printed * *Exceptions: * *******************************************************************************/ int __cdecl printf ( const char *format, ... ) /* * stdout 'PRINT', 'F'ormatted */ { va_list arglist; int buffing; int retval; va_start(arglist, format); _ASSERTE(format != NULL); _lock_str2(1, stdout); buffing = _stbuf(stdout); retval = _output(stdout,format,arglist); _ftbuf(buffing, stdout); _unlock_str2(1, stdout); return(retval); }
"There are three kinds of people in the world...
Those that can count and those that can't."
Hi,
arent these declared in ctype.h ?islower - find out if the argument is lowecase
isupper - finds if argument is upper
isdigit - finds if argument is digit
isalpha - fins if argument is a letter
isalnum - find wether its upper, lower, or a number
isxdigit - finds if argument is hexadeciaml
according to my reference they are.... http://www-ccs.ucsd.edu/c/
it just came to my mind
encrypted