c language
I want to ask how I can use %s to printf my string and scanf my string ? how do I modify? int main(void) { ASA_DEVICE_set(); int i; int A[5][2]; char B[5][1]; int temp2=0, temp3=0,j=0; char temp1; for(int i=0; i<4;i++){ printf("key in your name :\n"); scanf("%s",&B[i][0]);} for(int i=0; i<4;i++){ printf("key in your id :\n"); scanf("%d",&A[i][0]);} for(int i=0; i<4;i++){ printf("key in your score :\n"); scanf("%d",&A[i][1]); } for(int k=0;k<4;k++) { for( int j = k; j < 4; j++) { if( A[j][1] < A[k][1] ) { temp1 = B[j][0]; B[j][0] = B[k][0]; B[k][0] = temp1; temp2 = A[j][1]; A[j][1] = A[k][1]; A[k][1] = temp2; temp3 = A[j][0]; A[j][0] = A[k][0]; A[k][0] = temp3; } } } for(int i=0; i<5;i++){ printf("name:%s id:%d score:%d\n",B[i][0],A[i][0],A[i][1]); } }