Академический Документы
Профессиональный Документы
Культура Документы
Solution:
Here we have to subnet a class A network address considering the following two conditions:
(i) to create at least 20 networks
(ii) maximum 160 hosts per network
--> Mask 255.255.0.0 has 8 bits for the subnet and 16 bits for the host
8 bits would accommodate 2^8=256 subnets [satisfy condition (i)]
16 bits would accommodate 2^16 -2 = 65534 hosts [does not satisfy condition (ii) since it is over
160]
--> Mask 255.255.255.0 has 16 bits for the subnet and 8 bits of the host.
16 bits would accommodate 2^16 = 65536 subnets [satisfy condition (i)]
8 bits would accommodate 2^8 -2 = 254 hosts [does not satisfy condition (ii) since it is over 160]
So according to the above explanation none of the subnet mask would work.
NB: Though the answer is mentioned as Both would work in several source. In the question if
minimum of 160 hosts is mentioned instead of maximum, then both would work.
#include<stdio.h>
int main(){
static int i;
for(++i;++i;++i) {
printf("%d ",i);
if(i==4) break;
return 0;
Answer: 2 4
4. What will be output of following c code?
#include <stdio.h>
int main()
int *p1,**p2;
double *q1,**q2;
printf("%d %d ",sizeof(p1),sizeof(p2));
printf("%d %d",sizeof(q1),sizeof(q2));
getch();
return 0;
Answer:
#include<stdio.h>
int main()
{
char arr[20]="MysticRiver";
printf("%d",sizeof(arr));
return 0;
}
Answer:
20
6. Y= A’ B’C’D’+A’B’CD’+A’BCD’+A’BCD+AB’C’D’+AB’CD’+ABCD’+ABCD
simplify the expression using K-MAP
Answer: BC+B'D'/B'D'+BC
7. What is the best case time complexity of recursive bubble sort? Write the algorithm of Merge sort.
Only Algorithm part not total part
10. Write an SQL query to print details of the Workers who have joined in Feb’2014.
SQL: