Languages-C & C Plus Plus [TCS Placement]: Sample Questions 8 - 9 of 119

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 8

C & C Plus Plus
Edit

Describe in Detail

Essay▾

Mention the execution process for managed code.

Explanation

  • A piece of managed code is executed as follows:
  • Choosing a language compiler:
    • One or more language compilers target the runtime and provide benefits of CLR.
    • Compiling the code to MSIL:
    • Compiling translates source code into Microsoft intermediate language (MSIL) and generates the required metadata.
    • Compiling MSIL to native code:
    • At execution time, just-in-time (JIT) compiler translates the MSIL into native code.
    • During compilation, code passes a verification process that examines the MSIL and metadata to find out whether the code is type safe.
    • Executing the code:
  • Common language runtime provides the infrastructure for execution.

Question 9

C & C Plus Plus
Edit

Write in Short

Short Answer▾

Can two or more operators such as and be combined in a single line of program code

Explanation

  • Yes, it՚s perfectly valid to combine operators, especially if the need arises.
  • For example: ″ printf ( ″ Hello⧵⧵ ‘World⧵’ ″ ) will output the text ″ Hello ″ on the first line and ″ World ″ enclosed in single quotes on the next two lines.
Given the Example of the and be Combined in a Single Line of Program Code

Developed by: