Basic CS [3i Infotech Placement]: Sample Questions 165 - 166 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 165

Question MCQ▾

Which program construct must return a value?

Choices

Choice (4)

a.

Stored Procedure

b.

Anonymous block

c.

Function

d.

Package

Edit

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 166

Write in Short Short Answer▾

Why should you care about the OSI reference model?

Edit

Explanation

  • OSI provides a framework for understanding network operations and design- designing new protocols, stacks and entire networks.
  • Not all network stacks obey the OSI fully, all the time with distinct layers but it still provides a useful system, which can be understood and obeyed throughout the world.
  • ISO standard for Networks defines this networking framework for implementing protocols in seven layers.
  • Convention and rules for network are collectively known as layer protocol.
  • OSI is considered a primary standard for internetworking and inter computing.