TCS Papers: Sample Questions 373 - 374 of 502

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

Question number: 373

» Basic CS » Networks

Essay Question▾

Describe in Detail

What is packet filter?


  • Packet filtering is also known as static filtering.

  • Packet filter is a standard router equipped with functionality to allow incoming or outgoing packets to be inspected.

  • Packets meeting some criterion are forwarded normally while those failing test are dropped.

  • Used as a firewall technique to control network access by monitoring outgoing and incoming packets based on the source and destination Internet Protocol (IP) addresses, protocols and ports.

  • Dealing with each individual packet, the firewall applies its rule set to determine which packet to allow or disallow.

  • A packet filter firewall is the simplest type of firewall.

Image of the packet filter

Image of the Packet Filter

Image of the packet filter

Question number: 374

» Languages » C & C Plus Plus



Why reference is not same as a pointer?


Choice (4) Response


A reference once established cannot be changed.


A reference can never be null.


Reference doesn’t need an explicit dereferencing mechanism.


All a. , b. and c. are correct




  • Both references and pointers can be used to change local variables of one function inside another function.

  • Both of them can also be used to save copying of big objects when passed as arguments to functions or returned from functions, to gain efficiency.

  • References do not provide physical memory address to the programmer. They are handled by the compiler. They can never be null.

  • A reference is statically associated with one memory location (or variable) they cannot be changed.

  • Reference does not need an explicit dereferencing mechanism (dereferencing is handled by the compiler). A reference has the same memory address as the item it references.

  • A pointer is a variable that holds a memory address.

  • Const references can be bound to temporaries.

 Reference and pointer

Reference and Pointer

Given the image is define the difference between references and pointers