TCS Placement: Sample Questions 444 - 446 of 502

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 444

Edit

Write in Short

Short Answer▾

If DCPRY is coded as CBOQX then how SPEND can be coded?

Explanation

  • Here, DCPRY is coded as CBOQX, i.e.. each letter is shifted towards left by one position in alphabetical order. Like, D is coded as C, C is coded as B, P is coded as O, R is coded as Q and Y is coded as X. Same way we are asked to find the code word for SPEND.
  • Shifting each letter towards left by one position in alphabetical order,
  • S will be coded as R, P will be coded as O, E will be coded as D, N will be coded as M and D will be coded as C.
  • So, code word for SPEND will be RODMC.

Question 445

Edit

Write in Short

Short Answer▾

Is this program statement valid? INT = 10.50;

Explanation

  • Assuming that INT is a variable of type float, this statement is valid.
  • Reserved words are express in lowercase, so the C compiler will not interpret “INT” as a reserved word.
Given the Image is Defining the INT is a Variable of Type Float, this Statement is Valid

Question 446

Edit

Describe in Detail

Essay▾

What is Common Type System (CTS) ?

Explanation

  • CTS is the CLR component which allows support for multiple languages through a type system common across all the languages.
  • Two CTS-compliant languages do not require type conversion when calling the code written in one language from within the code written in another language.
  • CTS provide a base set of data types for all the languages supported by. NET Framework.
  • That is size of integer and long variables is same across all . NET-compliant programming languages.
  • Each language internally uses aliases for the base data types provided by CTS.
  • For example, CTS uses the data type system. int32 to represent a 4 byte integer value- Visual Basic uses the alias integer for the same and C# uses the alias int.
Given the Image is Define the Common Type System (CTS)

Developed by: