3i Infotech Placement: Sample Questions 610 - 611 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 610
Question MCQ▾
To send a data packet using datagram, connection will be established
Choices
Choice (4) | |
---|---|
a. | connection is not established before data transmission. |
b. | before data transmission. |
c. | no connection is required. |
d. | All of the above |
Answer
c.Explanation
- To send a data packet using datagram no connection is required.
- User datagram protocol allows an application to send data packet with a low overhead in some important standards.
- Datagram sends and receives data packets like TCP without any connection
- Datagram is routed and send individually with no guarantee of delivery.
- To send and receive datagrams an appropriate socket is required - for example an instance of the java. net. DatagramSocket class.
Question 611
Describe in Detail Essay▾
What is the output of the following program?
#define DIM (array, type) sizeof (array)/sizeof (type)
main ()
{
int arr[10];
printf (“The dimension of the array is %d”, DIM (arr, int) );
}
Explanation
The dimension of the array is 10
In the program
int arr [10] ; |
|
#define DIM (array, type) sizeof (array) /sizeof (type) |
|
printf ( “The dimension of the array is % d” , DIM (arr, int) ) ; |
|