TCS Placement: Sample Questions 56 - 58 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 56

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.

Question 57

Edit

Write in Short

Short Answer▾

Average age of 18 men is decreased by 1 year when one man whose age is 49 years is replaced by a new man. Find age of the new man.

Explanation

  • Let the average of 18 men be x previously.
  • So, total age of 18 men = 18x
  • It becomes x - 1 when one man of age 49 is replaced by a new man.
  • Let the age of new man be y years.

  • So, age of new man is 31 years.

Question 58

Edit

Describe in Detail

Essay▾

What is a node?

Explanation

  • A network consists of two or more computers directly connected by physical medium such as coaxial cable or optical fiber- physical medium is called links and the devices it connects are called nodes.
  • A node is thus any active, physical, electronic device attached to a network- devices then become capable of sending, receiving, or forwarding information sometimes a combination of the three.
  • Examples of nodes include bridges, switches, hubs, and modems to other computers, printers, and servers.
  • One of the most common forms of a node is a host computer often referred to as an Internet node.
Given the Image is Define the Nodes in Example

Developed by: