Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

10. using nested for loops print the array x so it shows on the Screen With the

ID: 643199 • Letter: 1

Question

10. using nested for loops print the array x so it shows on the Screen With the proper rows and columns. You must use the int row, col variables correctly. char x[10][25]; assume this function has filled the array with characters Circle the correct answer 11. The correct way to copy hello into an array char ans[80], a. ans = hello; b. hello = ans; c. strcpy(ans, hello); 12. The correct way to copy 1 into int x is: a. 1=x; b. x=1; C. 1==x; d. x==1; 13. The correct Boolean expression to test if hello is equal to goodby 14. Write the Boolean expression to test if N is between 1 and 10 15. Given the array A filled with random integers and using row and col correctly find the smallest number and print it.

Explanation / Answer

10)

for(row=0; row<10; row++){
   for(col=0; col<15; col++){
       printf("%c ",x[row][col]);
   }
   printf(" ");
}

11) strcpy(ans, "hello");

12) x = 1;

13) strcmp("hello","goodby")==0

14) if(N>=1 && N<=10)

15) min = A[0][0];
for(row=0; row<10; row++){
   for(col=0; col<20; col++){
       if(A[row][col]<min)
           min = A[row][col];
   }
}
   printf("Minimum element is %d",min);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote