The statement XXX that will correctly swap the values in smallArray[0] and smallArray[2] are:
temp = smallArray[0];
smallArray[0] = smallArray[2];
smallArray[2] = temp;
What is a statement in coding?A statement is a grammatical unit of an imperative computer language that expresses some action to be performed. A program developed in this language is made up of a series of one or more statements.
A program code can contain a variety of statements that regulate the input and output of the tasks that the program is supposed to do.
A coding instruction that is used to compare data, express and make judgments. A conditional statement instructs a program to do action based on whether a condition is true or false. It's frequently expressed as an if-then or if-then-else expression.
Learn more about statements:
https://brainly.com/question/13735734
#SPJ1