Kết quả của chương trình sau là gì: #include <stdio.h> #include <conio.h> float x[] = {63.2, -45.6, 70.1, 3.6, 14.5 }; int n=sizeof(x)/sizeof(float); void main()
13/25
Kết quả của chương trình sau là gì: #include <stdio.h> #include <conio.h> float x[] = {63.2, -45.6, 70.1, 3.6, 14.5 }; int n=sizeof(x)/sizeof(float); void main() { clrscr(); int i,j; floar c; for (i=0, j=n-1; i<j; i++, j--); { c=x[i]; x[i]=x[j]; x[j]=c; }; printf("\nDay ket qua la: \n"); for (i=0 ; i<n ; i++) printf("%8.2f ", x[i]); getch(); return; };
Dãy kết quả là: 63.20, -45.60, 70.10, 3.60, 14.50.
Dãy kết quả là: 14.50, 3.60, 70.10, -45.60, 63.20.