Languages [TCS Placement]: Sample Questions 16 - 18 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 16

Edit

Describe in Detail

Essay▾

What is a newline escape sequence?

Explanation

  • A newline escape sequence is represented by the character.
  • Used to insert a new line when displaying data in the output screen.
  • More lines can be added by inserting more characters.
  • For example, ⧵ would insert two lines.
  • A newline escape sequence can be placed before the actual output expression or after.
Given the Image is Defining the , Which is a New Line Character

Question 17

Edit

Describe in Detail

Essay▾

How do you construct an increment statement or decrement statement in c?

Explanation

  • There are actually two ways you can do this.
  • One is to use the increment operator ++ and decrement operator -.
  • For example, the statement “x ++” means to increment the value of x by 1.
  • Likewise, the statement “x-” means to decrement the value of x by 1.
  • Another way of writing increment statements is to use the conventional + plus sign or - minus sign.
Given the Example of Increment and Decrement Operators Program

Question 18

Edit

Describe in Detail

Essay▾

What are header files and its uses in c programming?

Explanation

  • Header files contain two essential things: the definitions and prototypes of functions being used in a program.
  • Simply put, commands in C programming are actually functions defined from within each header files.
  • Each header file contains a set of functions.
  • For example, “stdio. h” header file contains declarations like printf and scanf.
  • A header file in C programming language is a file with . h extension which contains a set of common function declarations and macro definitions shared across multiple program files.
  • C language provides a set of in build header files containing commonly used utility functions and macros.

Developed by: