TCS Papers: Sample Questions 215 - 216 of 502

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

Question number: 215

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

Can a variable be both constant and volatile?

Explanation

  • Yes.

  • The const modifier means that this code cannot change the value of the variable, but that does not mean that the value cannot be changed from outside.

  • Consider the value of timer- The function itself might not change the value of the timer, so it was declared const. However, the value was changed by hardware on the computer, so it was declared volatile.

  • If a variable is both const and volatile, the two modifiers can appear in either order.

  • This is used mostly in an embedded system.

  • As another example consider the Interrupt Status Register- a status register, program should not modify this variable so it should be a constant. But this variable can be changed by the processor or hardware based on the interrupt condition. So the program should read the value of this variable without any optimization and hence it should be declared as volatile.

Question number: 216

» Basic CS » Networks

Essay Question▾

Describe in Detail

What are the categories of transmission media?

Explanation

Bounded/Guided Media

Bounded media or guide media are physical links that confine signals to narrow path. They are made up of an external conductor (copper) bounded by jacket material. They are used in labs because of high speed, good security, and low cost. They however cannot be used in long distance communication.

  • Twisted-pair (TP) cable

    • The most popular network cable is twisted pair- light-weight, easy to install, inexpensive and supports many network types.

    • Supports speed of 100 mps.

    • Made of pairs of solid or stranded copper twisted along each other.

    • There are two types of twisted pairs cabling

  • Shielded TP

    It is similar to TP but a mesh shielding protects signal from EMI allowing higher transmission rate.

  • Unshielded TP

    UTP is more common- can be either voice grade or data grade depending on the condition.

  • Coaxial Cable

    Coaxial cable is very common & widely used. For example, TV wire.

  • Fiber-optic cable

    Fiber optic cable uses light to transmit data. Since light only moves in one direction for two-way communication a second connection must be made between the two devices. Each stand is responsible for one direction of communication.

Image of the guided media

Image of the Guided Media

Given the image is define the

Unguided Media

  • It has a very low frequency.

  • Used for data communication when wireless keyboards, mouse and printers are used.

Terrestrial Microwave

  • Terrestrial microwave transmissions are sent between two microwave stations on the earth.

  • Common for long-distance communication.

  • Operate in the low gigahertz range.

  • A parabolic dish focuses a narrow beam onto a receiver antenna.

 Terrestrial microwave

Terrestrial Microwave

Given the image is define the terrestrial microwave part of unguided media

Satellite Communication

  • Communication satellite, which links ground stations, operates on a number of frequency bands, called transponder channels.

  • Receivers receive on one frequency band and transmit on another frequency.

 Satellite communication

Satellite Communication

Given the image is define the satellite communication