TCS Papers: Sample Questions 332 - 334 of 502

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

Question number: 332

» Basic CS » Networks

Essay Question▾

Describe in Detail

What is managed extensibility framework?

Explanation

  • Managed extensibility framework (MEF) is a new library introduced as a part of. NET 4.0 and Silverlight 4.

  • Provides greater reuse of applications and components.

  • Allows host application to consume external extensions without any configuration requirement, allowing lightweight, extensible applications.

  • Allows application developers to discover and use extensions with no configuration and allows code encapsulation to avoid fragile hard dependencies.

  • MEF allows extensions to be reused across applications as well.

Image of the MEF Demo

Image of the MEF Demo

Given the image is define the Managed extensibility framework (MEF) demo.

Question number: 333

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

Advantages of a macro over a function?

Explanation

  • Program is slightly faster

  • No overhead of a function call and function return.

  • Macro parameters are generic

  • Macro parameters do not have types, so can be used with int, float, double etc. arguments

Advantages of Macro over function

Advantages of Macro over Function

Given the image is define the advantages of a macro over a function

Question number: 334

» Basic CS » Data Structures

Essay Question▾

Describe in Detail

List out few of the Application of tree data-structure?

Explanation

  • The Application of tree data structure are:

  • The manipulation of Arithmetic expression: An arithmetic expression results in a numeric value. There are two kinds of numeric values, integers (whole numbers), and real or floating point numbers (numbers containing a decimal point).

  • Symbol table construction: Symbol table is maintained by compilers to store information about various entities such as variable names, function names, objects, classes, interfaces, etc. Symbol table is used by both the analysis and the synthesis parts of a compiler.

Symbol table in image

Symbol Table in Image

Symbol table in image

  • Syntax analysis- A syntax analyzer or parser takes the input from a lexical analyzer in the form of token streams. The parser analyzes the source code (token stream) against the production rules to detect any errors in the code. The output of this phase is a parse tree.

  • In compiler, every expression is converted into syntax tree format.

Image of the syntax tree

Image of the Syntax Tree

Image of the syntax tree