Final answer:
The correct option for squaring an integer and printing the result is option A, which multiplies the integer by itself using the x*x syntax and prints the result using a printf statement.
Step-by-step explanation:
The correct option for writing a program that squares an integer and prints the result is option A.
This code initializes an integer variable x with the value 5. It then uses the printf function to print the square of x by multiplying it with itself (x*x). The %d format specifier is used to display the result as an integer.