1. Question:What are the advantages and disadvantages of a heap? 

    Answer
    Storing data on the heap is slower than it would take when using the stack. However, the main advantage of using the heap is its flexibility. That’s because memory in this structure can be allocated and remove in any particular order. Slowness in the heap can be compensated if an algorithm was well designed and implemented.






    1. Report
  2. Question:Create a simple code fragment that will swap the values of two variables num1 and num2. 

    Answer
    temp = num1; 
    num1 = num2; 
    num2 = temp;






    1. Report
  3. Question:What are reserved words? 

    Answer
    Reserved words are words that are part of the standard C language library. This means that reserved words have special meaning and therefore cannot be used for purposes other than what it is originally intended for. Examples of reserved words are int, void, and return.






    1. Report
Copyright © 2025. Powered by Intellect Software Ltd