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

1. which data structure is defined as a collection of similar data (a) Arrays (c

ID: 3601401 • Letter: 1

Question

1. which data structure is defined as a collection of similar data (a) Arrays (c) Trees 1 elements? b) Structs (d) Graphs 2 Suppose cursor refers to a node in a linked. What statement changes cursor so that it refers to the next node? (a) cursor* (b) cursornext cursor next; (d) cursor cursornext 3 The value 132.54 can represented using which data type? (a) int (c) float (b) char none 4 Which of the following is a valid variable name (a) ptr.data c) grade (b) char (d) %number 5 Where a memory located for local variable (a) heap (b) stack cache d none 6 To declare an integer variable called "ld" in Clanguage we do the following (a) float id (c) char ID b) int ID none 7what are the possible values of local variable of type char (c) "troy d) a and c answers 8 A pointer variable can hold (a) string (c) address (b) integer (d) band c answers 9 A pointer variable can point to the (a) heap (c) cache memory (b) stack (d) a and b answers 10 Where does C program locate memory for data storage (a) heap (c) a and b answers when does a memory located for local variable (b) stack (d) data 11 (a) run time (b) compile time (d) none (c) link time 12 The output of the code below is if(x

Explanation / Answer

Answer:-

Answer 1. option(a) : Array.

Answer 2. Option(d) : cursor=cursor->next.

Answer 3. Option(c) : float.

Answer 4. Option(c): _grade.

Answer 5. Option(b): stack.

Answer 6. Option(d): none .

Answer 7. Option(b) : 'c'.

Answer 8. Option(c): address.

Answer 9. Option( d): pointers point to any memory where an object or function can appear: stack, static, heap, code, mapped, shared, whatever.

Answer 10. Option(c): it can be both stack and heap.

Answer 11. Option(a) : runtime .

Answer 12. Option(b) : no.

Answer 13. Option( d): infinite loop because when in while loop i is increasing and j are decreasing constantly.

Answer 14. Option(a): loop loop loop because loop will execute 3 times.

Answer 15. Option(d): print nothing because i has initial value 0 and in while statement i++ which is postfix so it will not enter into the loop.

Answer 16. Option(d) : Structure.

Answer 17. Option(b) : for loop .

Answer 18. Option(b): 3name because at an initil place we cant write a number.

Answer 19. Option(c): float because it is datatype and reserved.