Basic CS [3i Infotech Placement]: Sample Questions 70 - 71 of 243

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 70

Edit

Describe in Detail

Essay▾

In the given binary tree, using array we can store the node 4 at which location?

Explanation

Image Shows the Binary Tree
  • At location 6: 1 2 3 -- 4 -- 5
  • This is how array stores the tree: Root LC1 RC1 LC2 RC2 LC3 RC3 LC4 RC4, where LCn means Left Child of node n and RCn means Right Child of node n

Question 71

Edit

Describe in Detail

Essay▾

In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?

Explanation

Dynamic Linking in Image
Difference between Load Time Dynamic and Runtime Linking
Load time dynamic linkingRuntime linking
  • Links objects at compile time, before execution of the program.
  • Links objects at execution time.
  • Only reference those files which are present during the compilation, no dynamic linking is possible.
  • Reference files at run time - might not be present during the compilation of the program.
  • File size is directly linked with the linked files.
  • File size is not dependent on the linked files. (DLLs in Windows are dynamically linked and used by applications)
  • Not optimal as the code is repeated in many applications.
  • Better as many applications can use the same DLL methods.

Developed by: