printf("") 와 fprintf(stdout, "");
scanf("") 와 fscanf(stdin, "");
의 차이가 먼가요 .?
많아요.
세벌 https://sebuls.blogspot.kr/
Visual C 에서 F11 눌러보니까. 이런 소스가 나오네요. 차이점은. 인자값을 파일 포인터'로 사용하느냐. 사용하지 않느냐. 입니다.
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); }
int __cdecl fprintf ( FILE *str, const char *format, ... ) /* * 'F'ile (stream) 'PRINT', 'F'ormatted */ { va_list(arglist); REG1 FILE *stream; REG2 int buffing; int retval; va_start(arglist, format); _ASSERTE(str != NULL); _ASSERTE(format != NULL); /* Init stream pointer */ stream = str; _lock_str(stream); buffing = _stbuf(stream); retval = _output(stream,format,arglist); _ftbuf(buffing, stream); _unlock_str(stream); return(retval); }
int __cdecl scanf ( const char *format, ... ) /* * stdin 'SCAN', 'F'ormatted */ { int retval; va_list arglist; va_start(arglist, format); _ASSERTE(format != NULL); _lock_str2(0, stdin); retval = (_input(stdin,format,arglist)); _unlock_str2(0, stdin); return(retval); }
int __cdecl fscanf ( FILE *stream, const char *format, ... ) /* * 'F'ile (stream) 'SCAN', 'F'ormatted */ { int retval; va_list arglist; va_start(arglist, format); _ASSERTE(stream != NULL); _ASSERTE(format != NULL); _lock_str(stream); retval = (_input(stream,format,arglist)); _unlock_str(stream); return(retval); }
//기타 참고 링크http://promisej7.tistory.com/252http://blog.naver.com/mr_null?Redirect=Log&logNo=90040347935http://the__g.blog.me/140157144045
---------------------------------------------------------------------------- 젊음'은 모든것을 가능하게 만든다.
매일 1억명이 사용하는 프로그램을 함께 만들어보고 싶습니다. 정규 근로 시간을 지키는. 야근 없는 회사와 거래합니다.
각 분야별. 좋은 책'이나 사이트' 블로그' 링크 소개 받습니다. shintx@naver.com
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
많아요.
많아요.
세벌 https://sebuls.blogspot.kr/
저도 궁금해서 찾아봤습니다.
Visual C 에서 F11 눌러보니까. 이런 소스가 나오네요.
차이점은. 인자값을 파일 포인터'로 사용하느냐. 사용하지 않느냐. 입니다.
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);
}
int __cdecl fprintf (
FILE *str,
const char *format,
...
)
/*
* 'F'ile (stream) 'PRINT', 'F'ormatted
*/
{
va_list(arglist);
REG1 FILE *stream;
REG2 int buffing;
int retval;
va_start(arglist, format);
_ASSERTE(str != NULL);
_ASSERTE(format != NULL);
/* Init stream pointer */
stream = str;
_lock_str(stream);
buffing = _stbuf(stream);
retval = _output(stream,format,arglist);
_ftbuf(buffing, stream);
_unlock_str(stream);
return(retval);
}
int __cdecl scanf (
const char *format,
...
)
/*
* stdin 'SCAN', 'F'ormatted
*/
{
int retval;
va_list arglist;
va_start(arglist, format);
_ASSERTE(format != NULL);
_lock_str2(0, stdin);
retval = (_input(stdin,format,arglist));
_unlock_str2(0, stdin);
return(retval);
}
int __cdecl fscanf (
FILE *stream,
const char *format,
...
)
/*
* 'F'ile (stream) 'SCAN', 'F'ormatted
*/
{
int retval;
va_list arglist;
va_start(arglist, format);
_ASSERTE(stream != NULL);
_ASSERTE(format != NULL);
_lock_str(stream);
retval = (_input(stream,format,arglist));
_unlock_str(stream);
return(retval);
}
//기타 참고 링크
http://promisej7.tistory.com/252
http://blog.naver.com/mr_null?Redirect=Log&logNo=90040347935
http://the__g.blog.me/140157144045
----------------------------------------------------------------------------
젊음'은 모든것을 가능하게 만든다.
매일 1억명이 사용하는 프로그램을 함께 만들어보고 싶습니다.
정규 근로 시간을 지키는. 야근 없는 회사와 거래합니다.
각 분야별. 좋은 책'이나 사이트' 블로그' 링크 소개 받습니다. shintx@naver.com
댓글 달기