3i Infotech Papers: Sample Questions 897 - 900 of 1245

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

Question number: 897

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

Are the expressions arr and &arr same for an array of integers?

Explanation

Arr and &Arr both are same, which will return the address of first element of the array.

  1. void main()
  2. {
  3.     char arr[10]= “kishor”;
  4.     printf(“n%u:%u”, a, &a);
  5. }
  6. Output:
  7. 65516:65516

Question number: 898

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

Does mentioning the array name give the base address in all the contexts?

Explanation

  • Yes, mentioning the name of array provides the base address of the array.

  • Printing the name of array will print the base addres- while using printf () to print address uses % u and not % d as address are not integer, but unsigned integers

Question number: 899

» Languages » Assembly Language

MCQ▾

Question

Word alignment is

Choices

Choice (4) Response

a.

aligning the address to the next word boundary of the machine.

b.

aligning to word boundary.

c.

aligning to even boundary.

d.

Question does not provide sufficient data or is vague

Answer

a.

Explanation

Define word allignment.

Define Word Allignment.

Define word allignment.

  • A word is the natural unit of data used by a particular processor and is unique to each processor architecture.

  • Word alignment is the address of the next word boundary of the machine.

  • It determines how the machine instructions should be broken into blocks.

  • Alignment determines the size of the block machine can access.

Question number: 900

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

What is late bound function call and early bound function call? Differentiate.

Explanation

Understanding of part of binding

Understanding of Part of Binding

Understanding of part of binding

  • All virtual functions have late binding.

  • All non-virtual functions will have early binding.

  • Early binding happens at compile time.

  • Late binding happens at runtime based on type of object referred a by a pointer variable.

  • For example: base class B and derived class D have both implemented a method F ().

    B * ptr = new D;

    ptr- > F ();

  • If F () is virtual then D’s implementation is called.

  • If F () is not virtual than B’s implementation is called.