sprintf() confusion... Only one buffer?

Can I not use more than one buffer with the sprintf() function? Here is a program that shows that the second buffer corrupts the first buffer... I am trying to understand what is causing this...

char buff1[3];
char buff2[3];

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  
  sprintf(buff1,"%d:%d",1,2); // 1:2
  Serial.print("buff1>");
  Serial.print(buff1);
  Serial.println("<");
  
  sprintf(buff2,"%d:%d",3,4); // 3:4
  Serial.print("buff2>");
  Serial.print(buff2);
  Serial.println("<");

  Serial.print("buff1>");
  Serial.print(buff1);
  Serial.println("<");
}

void loop() {
  // put your main code here, to run repeatedly:

}

The output with this program is:

buff1>1:2<
buff2>3:4<
buff1><

Why did buff1 change when we assigned buff2?

Your buffer isn't big enough

char buff1[3];  //not big enough for 3 characters and a terminating zero
char buff2[3];  //ditto

... and furthermore, you should not presume the order of variables in memory.

TheMemberFormerlyKnownAsAWOL:
Your buffer isn't big enough

Ahh.... Bingo! If I change it to buff1[4] and buff2[4] it all works. I forgot about the \0 character that is needed in the arrays.
You guys are awesome!!! Many thanks!!

It is a bit safer to use snprintf() instead of sprintf(). Given the size of the buffer, snprintf() will truncate the text to allow space for the null terminator.