TCS Papers: Sample Questions 259 - 260 of 502

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 259

» Basic CS » Networks

Essay Question▾

Describe in Detail

What is the difference between int and int64.

Explanation

Difference between int and int64

Difference between int and int64

Int

Int64

int is a primitive type allowed by the C# compiler

Int32 is the Framework Class Library type

It is mapped to Int32 of FCL type

In C#, long is mapped to Int64.

It is a value type and represents System. Int32 struct.

It is a value type and represent System. Int64 struct.

It is signed and takes 32 bits.

It is signed and takes 64 bits.

It has minimum -2147483648 and maximum + 2147483647 value.

It has minimum –9,223,372,036,854,775,808 and maximum 9,223,372,036,854,775,807 value

Question number: 260

» Basic CS » Operating System

Essay Question▾

Describe in Detail

Explain the concept of Reentrancy?

Explanation

  • It is a useful, memory-saving technique for multiprogrammed timesharing systems.

  • A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period.

  • Reentrancy has key aspects: The program code cannot modify itself, and the local data for each user process must be stored separately.

  • Permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program.

  • Each execution instance is called activation. It executes the code in the permanent part, but has its own copy of local variables/parameters.

  • The temporary part associated with each activation is the activation record.

  • Generally, the activation record is kept on the stack.

  • Dynamic stack variables provide inherent reentrancy.

  • Each task has ints own task.

  • E. g. linked list in lstLib

  • Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure.

Image of The Reentrancy

Image of the Reentrancy

Given the image is define the reentrancy program is a way to handle multitasking