이런 저런 함수들?

dandb3·2023년 3월 7일
0

몰?루

목록 보기
1/2

sprintf

printf한 결과를 포인터에 집어넣는다.

#include <stdio.h>
int	sprintf(char *restrict s, const char *restrict format, ...);
  • s라는 주소에 printf와 동일한 포맷 스트링을 통해서 값을 집어넣는다.
  • 리턴값은 printf와 동일한 s에 쓰여진 바이트 수에 해당. 물론 널바이트는 제외.
profile
공부 내용 저장소

0개의 댓글