The president said China agreed to take steps to protect intellectual property and had promised to buy more than $40 billion in agricultural products.