Languages [TCS Placement]: Sample Questions 3 - 5 of 131

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 3

Edit

Describe in Detail

Essay▾

Can the curly brackets {} be used to enclose a single line of code?

Explanation

  • While curly brackets are mainly used to group several lines of codes, it will still work without error if you used it for a single line.
  • This method organizes codes to make it look clearer, especially in conditional statements.
Given the Image Define the Main Uses of Curly Braces Are Listed in the Examples

Question 4

Edit

Write in Short

Short Answer▾

In C programming, how do you insert quote characters ( ‘and’ ) into the output screen?

Explanation

  • This is a problem because quotes are normally part of a printf statement.
  • To insert the quote character as part of the output, use the format specifiers ⧵ ′ (for single quote) , and ⧵ ″ (for double quote) .

Question 5

Edit

Write in Short

Short Answer▾

What is c ++ ?

Explanation

  • Released in 1985, C ++ is an object-oriented programming language created by Bjarne Stroustrup.
  • Similar to C- simplifying memory management and adding features - including a new datatype known as a class - to allow object-oriented programming.
  • C ++ allows for low-level memory access but also gives the programmer tools to simplify memory management.
  • Is used to make CGI scripts or console-only DOS programs.

Developed by: