3i Infotech Papers: Sample Questions 1005 - 1006 of 1245

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

Question number: 1005

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

What do you mean by inline function?


  • Inline function is used with classes.

  • For inline function, the compiler places a copy of the code of that function at each call at compile time.

  • Function define in a class definition is an inline function definition, even without the use of the inline keyword.

Advantages of inline function:

  • Function call overhead doesn’t occur.

  • Saves the overhead of pushing variables on the stack when function is called.

  • Saves overhead of a return from a function.

  • Useful for embedded system because inlined small functions produce lesser code than the function call preamble and return.

Disadvantages of inline function:

  • Too many inline functions result in large of the binary executable, because of code duplication.

  • Inline functions reduce instruction cache hit rate, thus reducing the speed of instruction fetch.

  • Increase compile time overhead since code any change in code inside the inline function means all the calling location will be recompiled.

  • It is not use many embedded system, because system code size is more important than speed.

Question number: 1006

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

What is the maximum combined length of command line arguments including the space between adjacent argument?


  • It may vary from one operating system to another.

  • C does not impose any limits on command line on length or number of command line arguments.

  • Actual value of INT_MAX and SIZE_MAX are implementation defined by the OS.