C and Data Structure Questions

1. What are binary trees?
 
  • Binary trees are actually an extension of the concept of linked lists.
  • A binary tree has two pointers, a left one and right one. Each side can further branch to form additional nodes, which each node having two pointers as well.
 
Your Name Your Email-ID
Your Answer
2. What are the advantages and disadvantages of a heap?
 
  • 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.
 
Your Name Your Email-ID
Your Answer
3. What is macro?
 
  • Macro is a name which is given to a value or to a piece of code/block in a program.
  • Instead of using the value, we can use macro which will replace the value in a program.
  • Syntax: #define<MACRO_NAME>VALUE
 
Your Name Your Email-ID
Your Answer
4. What is a source code, object code and executable code?
 
  • Source code is a program written in a high level language, such as C.
  • Object code is a translated version of source code in machine language.
  • Executable code is a final version of a program, in machine language, that is executed on user's command.
 
Your Name Your Email-ID
Your Answer
123456789101112


131415 Page 1 of 15