Basic CS-Operating System [3i Infotech Placement]: Sample Questions 61 - 62 of 89

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

Question 61

Operating System

Question

MCQ▾

Which program construct must return a value?

Choices

Choice (4)

a.

Stored Procedure

b.

Anonymous block

c.

Function

d.

Package

Answer

c.

Explanation

Anatomy of a Static Method, Function Call and Return Type
  • Function must return a value.
  • A return statement causes execution to leave the current subroutine and resume at the point in the code immediately after where the subroutine was called, known as its return address.
  • The return address is saved, usually on the process՚s call stack, as part of the operation of making the subroutine call.
  • Return statements in many languages allow a function to specify a return value back to the code that called the function.
  • Not necessary for functions to return a value.
  • For example if the function operates on global variables, or on references of actual variables originally being used in the calling function or if there is no computation (and function only displays a message) then function need not return anything from the called function and its return type will simply be void.

Question 62

Operating System
Edit

Describe in Detail

Essay▾

What is object file? How can you access object file?

Explanation

Understanding of Object File
  • Object file is binary representation of source file.
  • Object and executable files have ELF format.
  • It is a collection of various sections segregating type of data in:
    • Text section
    • Data section
    • Stack
    • Heap.
  • These file are produced as the output of the compiler.
  • They consist of function definitions in binary executable by themselves.
  • Object files end in “. o” by convention, although on some operating systems, they often end in “. obj” .

Developed by: