Sprintf function clarification

Joined
May 1, 2022
Messages
1
Reaction score
0
If i have a sprintf function like
C:
void send(void)
{
char buffer[10];
int value=-10;
sprintf(buffer,"%d",value);
}
so does buffer contain data like this?
buffer[0] = '-'; // ascii value of -
buffer[1]='1'; // ascii value of 1
buffer[2] ='0'; // ascii value of 0
Please advise.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top