Quiz #7_ Attempt review _ eClass

.pdf

School

University of Alberta *

*We aren’t endorsed by this school

Course

201

Subject

Computer Science

Date

Apr 3, 2024

Type

pdf

Pages

6

Uploaded by SuperHumanSteel1194

Report
3/29/24, 12:32 AM Quiz #7: Attempt review | eClass https://eclass.srv.ualberta.ca/mod/quiz/review.php?attempt=15181059&cmid=7580431 1/6 Started on Wednesday, 20 March 2024, 2:45 PM State Finished Completed on Wednesday, 20 March 2024, 3:00 PM Time taken 15 mins 30 secs Grade 9.00 out of 10.00 ( 90 %) Question 1 Correct Mark 1.00 out of 1.00 Question 2 Correct Mark 1.00 out of 1.00 You can use realloc() to shrink the size of an already allocated memory block. E.g: You can reduce the size of a memory block of size 12 bytes to a size of 4 bytes using realloc(). Select one: True False The correct answer is 'True'. This a valid function declaration. Select one: True False The correct answer is 'True'.
3/29/24, 12:32 AM Quiz #7: Attempt review | eClass https://eclass.srv.ualberta.ca/mod/quiz/review.php?attempt=15181059&cmid=7580431 2/6 Question 3 Correct Mark 1.00 out of 1.00 Question 4 Correct Mark 1.00 out of 1.00 Which of the following statements will free the space allocated in the memory pointed by 'ptr'? Select one: a. ptr.free(); b. free(ptr); c. ptr = NULL; d. free(ptr = NULL); e. None of the above Your answer is correct. The correct answer is: free(ptr); Select the correct preprocessor directive to create a macro N equal to 50 . Select one: a. #define N 50 b. define N 50 c. #define N=50 d. #macro N 50 e. #macro N=50 f. None of the above Your answer is correct. The correct answer is: #define N 50 cross out cross out cross out cross out cross out cross out cross out cross out cross out cross out cross out
3/29/24, 12:32 AM Quiz #7: Attempt review | eClass https://eclass.srv.ualberta.ca/mod/quiz/review.php?attempt=15181059&cmid=7580431 3/6 Question 5 Correct Mark 1.00 out of 1.00 Which of the following is/are a wrong way of declaring a struct in C? A. B. C. Select one: a. A b. B c. C d. B and C e. None of them Your answer is correct. The correct answer is: C cross out cross out cross out cross out cross out
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help