3i Infotech Placement: Sample Questions 813 - 814 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 813

Edit

Describe in Detail

Essay▾
  1. #include<stdio.h>
  2. #defineMAX(x,y) (x)>(y)?(x):(y)
  3. intmain()
  4. {
  5.     inti=10;
  6.     intj=5;
  7.     intk=0;
  8.     k=MAX(i,j);
  9.     printf("%d %d %d",i,j,k);
  10. }

Explanation

  • In the program
Table Showing the Program
#define MAX (x, y) (x) > (y) ? (x) : (y)
  • define the MAX () function
  • Find the maximum value of 2 variable values
int i = 10;
  • define the integer variable i as 10
int j = 5;
  • define the integer variable j as 5
int k = 0;
  • define the integer variable k = 0
k = MAX (i, j) ;
  • Apply the MAX () function and max value store in k
printf ( “% d % d % d” , i, j, k) ;
  • printf prints the value of i = 10, j = 5 and k = 10

Question 814

Edit

Write in Short

Short Answer▾

What is the exact difference in between unicast and multicast object? Where will used?

Explanation

Table of Difference between Unicast and Multicast
UnicastMulticast
One machine is talking to only one other machinePacket is sent from one machine to one or more machines
Sender sends the data stream to a single receiver at a time.Sender and the interested receivers communicate.
One to one communication.One to many communication.
Information is sent from one point to another point.Information is sent from one or more points to a set of other points.

Developed by: