3i Infotech Placement: Sample Questions 304 - 306 of 1245

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 304


Write in Short

Short Answer▾
  1. main ()
  2. {
  3.     intc =--2;
  4.     printf ( “c =%d” c);
  5. }


  • In a program
    Table Shows the Program
    int c =-2;Here negation operator is used twice.

    Here apply maths rule: minus ⚹ minus = plus

    printf ( “c =% d” c) ;So, print “c = 2”
  • Note the key difference:- operator can only be applied to variables as decrement operator (e. g. i-) . 2 is constant and not a variable

Question 305


Describe in Detail


What is done on a Push operation?


Understanding of Push Operation
  • Insertion of any item on stack is called push.
  • An item is inserted from top of the stack.
  • On insert in stack top will be increased by

Algorithm for push operation:

Step 1: Initialization set top

Step 2: Repeat step 3 to 5 until top

Step 3: Read, item

Step 4: set top

Step 5: Set stack [top] item

Step 6: “stack overflow”

Question 306


Describe in Detail


What is the range of addresses in the classes of internet addresses?


Classes of IP Address in Networking
  • Internet address, short for Internet Protocol address, is identifying number for network hardware.
  • Allows a device to communicate with other devices over an IP-based network like the internet.
  • Networks using the TCP/IP protocol route messages based on the IP address of the destination.
  • IP addresses provide identity to the networked devices.

Below the Range of Addresses in the Classes of Internet Addresses

  • Class A 0.0. 0.0 - 127.255. 255.255
    • Class “A” network- first eight bits are network part of the address, remaining being the host part.
    • 128 possible class “A” networks.
  • Class B 128.0. 0.0 - 191.255. 255.255
    • A Class “B” network, first 16 bits are network part of the address.
    • First bit set to 1 and second bit set to 0.
    • 16,384 possible Class B networks.
  • Class C 192.0. 0.0 - 223.255. 255.255
    • First two bits are set to 1, and the third bit is set to 0.
    • 24 bits form the network address and remainder host address.
    • 2 million possible Class C networks.
  • Class D 224.0. 0.0 - 239.255. 255.255
    • Class “D” addresses used for multicasting applications.
    • Not used for “normal” networking operations.
    • First three bits set to “1” and their fourth bit set to “0” .
    • No host addresses within the Class “D” address space.
    • All the hosts within a group share the group՚s IP address for receiver purposes.
  • Class E 240.0. 0.0 - 247.255. 255.255
    • Networks are defined by the first four network address bits as 1.
    • This class is reserved; its usage was never defined.
    • Network implementations discard these addresses illegal or undefined.

Developed by: