You are on page 1of 73
U For the following description of various IP networking protocols write down the protocol name and its full form in the following table: ‘Sending mail from sender computer to receivers | SMTP- | mail server. Protocol. ‘Network management protocol used to automate | DHCP- Dynamic Host the process of configuring devices on IP networks. | Configuration Protocol. ‘Mapping a dynamic Internet Protocol address (IP | ARP- Address__‘Resolution address) to a permanent physical machine address | Protocol. ‘ina local area network (LAN). Messages are typically used for diagnostic or | ICMP- Internet Control Message ‘control purposes or generated in response to errors | Protocol ‘in IP operations. Simple Mail Transfer Answer the following: many usable address? | 2’-2=510 (ii) 192 168. 7 0/23, Find subnet mask. 255.255.254.0 (iii) 192.168. 10.0/23, Find Broadcast Address. 192.168.11.255 (iv) 192.168.10.0/23, What is last usable host? 192.168.11.254 Anewer: Correction 5a oq6A2 ste #include int maind) { anteda sum=0; i=1;1i<=10; i++) { sum=sumti; for ast } printf£("Sum of number=%d",sum) ; — _ return 0; joqsde OE. fo) Draw the logic diagram of Half-Adder the truth table of Full-Adder and use hay Adder (S) and basic gates to build a Full-Adder. Answi (Sum) $= AB+AB=A@B yg B c 0] (Cany) C= AB 0 Sm 0 I t tH [Rest of the answer See Sonali & Development Bank Ltd., Senior Officer (IT), Written Exam: 2020] ‘m A|B s 0/0 0 0 1 1 1] 0 1 1 1 0 xo A comparator has two inputs A= A;Ay and B= B,By and one output F. Outpa becomes one whenever the value of A>B (@ Show the truth table for F. _ = ADB ‘Comparator A=B B ASB [ a Answer: Question Bank ws implify the function using K-Map. Answer: enemas: For A>B: A,B, + AoBi By + ArAgBo SCHUM HEED Vase ad HL LU EIS IYI aM Rune UL mmvue revere (a) What is the usable number of host IP addresses available on a network that has if- 2 /26 mask? Write down the subset mask of this network. Write down the first and the last IP address that can be assigned to host PCs if the network address is 192.168.30.128/26, What address should be used for broadcast purpose im this Network? Answer: Usable number of host IP addresses available on a network that has a /26 masks are: 2" 2-22 =62. Submet Mask: [11111111.11111111,11111111,11000000} = 255.255.255.192 Given, network address is= 192,168,30.128/26 ¢ First usable IP Address: 192.168,30.129 © Last usable IP Address: 192.168,30.190 ys * Broadcast Address: 192.168.30.191 sc ‘a) Duplex (b) Half Duplex (c) Simplex (d) All : < Answer the following: 2 (@) 192.168.10.2/28, Find subnet mask. (ii) 192.168.10.2/28, Find Network Address. (iii) 192.168.10.2/28, Find IP Address of the first host? 68.10.2/28, Find IP Address of the last host? Dp ea ee ee = j Au Linux, History is a very useful command to show you all of the last commas that have been recently used. Grep is a Linux command-line tool used to searchlt a string of characters in a specified file. Write grep and history command tof previous commands in Linux. Answer: “Af In Linux, History is a very useful command to show you all of the last commands a hat have been recently used. Grep is a Linux command-line tool used to search for a string of characters in a specified file. Write grep and history command to find previous commands in Linux. Answer: history | grep -i searchterm Hu «& 3. Roth the aloorithm the Divide and Conaner and Nunamia Dennen ata salon & val_count 5 Write a function in Python programming ieee which parameter, orders first 10 line in output. Answer: with open (“datafile”) as myfile: head = [next(myfile) for x in xrange(10)] print head BITAC Assistant Maintenance Engineer (ICT) 4 Exam: 2021 (BUET) Write Output from below code: #include int main(){ int i; char s[]="Bangladesh Industrial and Technical Assistant Center"; char*s1; ‘COMPACT IT JOB SOLUTION v : Page | 337 Question Bank sl=s; for (i=0; i<10; i++) { printf ("%c", s({il); ++s1; } printf ("\n"); for(i=0; i<10; i++) { printf("%c", sl[il)7 ++s1; } return 0; } Output: Bangladesh nutiladTc 2. (@) Write the full form of those: Answer: @ : Secure Socket Layer a | nior a a eee vomosen ost teil )) Which IP address may haye secured via SSL and publicly by Tatrastrectereas, 3. Software as a Service is SaaS, Platform as a Service is PaaS and Service is laaS. Those are three types of Cloud services. In the following table, én are some Cloud services. Write the category of those: Answer: Search engine for a web server Google Docs Microsoft Azure Drop box Amazon Web Services (AWS) TaaS/PaaS/SaaS JaaS/SaaS IaaS/PaaS/SaaS Question Bank wrltten nen : nee aan ee &. Given a 100MHz clock signal derive a circuit using T-filp flops of generate S0MHz r and 25MHz clock signals. Draw a timing diagram for all the three clock signal. Answer: ox PET Lp a Tel a So if clk f.=100 MHz, QA output frequency =50 MHz and QB output frequency =25 MHz. © Resistance to corrosive materials 20K network address is given 172.18.10.0/23, divide this network address into 4 subnets and find every subnet address, start address, subnet mask, broadcast address ete. Answer: As we should divide the given network address into 4 subnets, we have to find a fixed CIDR for this operation. Here, total hosts = 2°(32-23) = 2°9 = $12 Now, 512/4 = 128 We can write 2°7 = 128 We see, every subnet block will have 128 hosts. 0, our network bit will be (32-7) = 25 So, our new CIDR or subnet prefix =/25 Ist Subnet: Subnet address = 172.18.10.0/25 Start address = 172.18.10.1 ‘Subnet mask = 255.255.255.128 (as new CIDR = \25, and 2°7 = 128) Broadcast address = 172.18,10.127 2nd Subnet: Subnet address = 172.18,10.128/25 Star address = 172.18.10.129 Subnet mask = 255.255.255.128 (as new CIDR =\25, and 2°7 Broadcast address = 172.18,10.255 | Sra Subnet: Subnet address = 172.18.11,0/25 (as 4th octet is filled up in previous subnet block, 8° 5rd octet is changed) Sart address = 172.18,11.1 Subnet mask = 255.255.255.128 (as new CIDR = 25, and 2°7 ~ 128) Broadcast address = 172,18,11,127 4th Subnet: Subnet address 172.18. 11 128/25. 09 Sur address = 17218.11.129 (ph ame Compact iTi08 SOLUTION —~S~C~*~ int main() { int i, $7 fOn(1=5; i>=171--) { for (j=1;j<=i; j++) { printf ("td",j)7 } printf ("\n"); } return 0; a . 8-bit microprocessor and 16-bit microprocessor write the data and address widths? Answer: 8-bit microprocessor data width = 8-bit COMPACT IT JOB SOLUTION ge | 387 / uy . Find Network address, Valid Host, Subnet mask and Broadcast address from 172.16.128.120/25. Answer: Here, Network bit = 25 So, Host bit= 32-25 = 7 Valid Host= 2” — 2 = 128-2 = 126 Network Address = 172.16.128.0 Subnet mask = 255.255.255.128 [LL 11111111 111111.11111111.10000000] Broadcast Address= 172.16.128.127 ~ Simplify the Boolean expression as possible ABCD+ABCD+ABD Answer: question Bank 1 AAO 6 ITH RE Bees cee, ee ABCD+ABCD+ABD "= « ABD (C+C)+ABD = ABD+ABD [ A+A = 1] «BD (A +A) «BD 6. ut of the following program: include int recursion(int x) { int static y=0; if (x<=0) return 1; yey*x? printf("Sd\n”, y); return recursion (x-2)+reécursion (x-3) ; } int main(){ int result; result = recursion(5); printf ("%d\n", result) ; return 0; pase } Question Bank eter | aif (i>5) break; sum=sumt+ (itp); printf ("i=td, p=td, sum=%d\n",i, p, sum); } printf("\n Outsite Loop, i=td, p=%d, sum=td\n", i, p, suj return 0; } -1, p=1, sum=0 a 1, p=1, sum=2 1 p=9, sum=14 i=5, p=25, sum=44 Outsite Loop, i=7, p=49, sum=44 ‘Class C network addresses range from 192.0. 0.0 to 223,255, 255.0. Class C is a type of IP address that is used for the small network. In this class, three octets are used to indent the network. This IP ranges between 192 to 223. In this type of network addressing method, the first two bits are set to be 1, and the third bit is set to 0, which makes the first 24 bits of the address them and the remaining bit as the host address. Mostly local area network used Class C IP address to connect with the network. Class C 4 subnet means it has 2?= 4 ‘Usable hosts = 2? -2 = 2 [2 PCs needed for each subnet] phe EE aden cca wnt een me ‘What is the subnet mask of 10.2.1.3/26 and Wh: Ce iba network that hi 26 mask? at is the usable number of IP Answer Subnet mask of 10.2.1.3/26 is = 255.255.255.192 Number of usable IP address = 2°-2 = 64-2 = 62 4, (a Simplify the following Boolean expression: (x+y+xy) (x+z) answer: =(xtyay) (x42) = (x¢y(1+x)) (x2) =x(lt2}txytyz (xt l= I] =xiayyz =x(ly}tyz = xtya [extl= 1] = xty2 ® Convert the following Octal number into Decimal and Hexadecimal: (651). snswer: (Octal to Decimal: =6x 87+ 5xB'+1x 8° =6x 64+ 4041 84+ 40-41 =(425)10 Octal to Binary: ff Ho 101. obi nant vt te Binary to Hexadecimal: 6 JI — 1 to 9 4 (651)s= (1A9)i6 ® \t is function overloading and operator overloading. Give example. + [See 16 NTRCA, Lecturer Computer (College), Written Exam: 2019] Write down a program to find length of a string without using any library function, Answer: #include int main() { char str[100],i; printf("Enter a string: \n"); scanf("%s", str); for (i=0; str[i]!="\0"7 ++i); printf("\nLength of input string: %d",i); return 0; Auestion Bank Written 4, ‘What is NAT? Why used and how NAT translate? (er; (See BPSC, Assistant Programmer (Ministry of Commerce), Exam: 2021] TOM math: rate= 1.536 Mbps, age size= 960000, Slot=32, end to end circuit foe time. a Time= 800x10" er 0.800+0%" = 0,8+20 = 20,8sec ¥. If main memory access time is 100ns, cache access time is 50 ns, cache hit rate is 90% then what is the average time to read from memory? Answer: ( Hit ratio of cache =R= 0.9 Cache access time =CT=50 ns Memory access time =MT= It CPU access time 9=R*CT+(1-R)*MT =0.9* 50+ 0.1 * 100=55 ns 10. ER diagram to Schema diagram: u a C++ program to omit spaces from e string. fh namespace std; veSpaces (char *str) { it = 0 Bipomnes+] = str{il; a Oititen r9chen te fe "Com pa ct! IT"; es (str); t cI program up to series n: =*— stant 2. le space std; rain () ( Buble 1, sum=0,n; put<<"Enter the value of ni"; <"Sum is:"< wa afk 38 Bank Account coma way ce form fillup Fr | Iv we Manager WE HH aH Be Account-t 2 fe fx Tat Deposit FHM Account 75" BT a Process B DED at 6c ert =| 4 Builtin authentication and privacy support, and compare the Quick-sort and Merge-sort ¥ ate reas. Algorithms in term of their = [se BPSC, Workshop Maintenance Engineer (CSE), Em 2001) resem can you Implement AND, OR and NOT si 4 est What ithe man diference between Latch and pay a eee [See DMLC, Assistant Teacher (ICT), Exam: 2021] between Latch and Flip-flop: Ditetee Bangladesh Water Development Bord, Asan Programmer, Wien Tex 2018) “Write a program in CiJava to find out the factorial of a number using recursion Spite its iterative program. : : ra “Answer: [See BPSC, Assistant Network Engineer, Writen Exam: 2025] 4 Solve the recurrence relation: T(n) = 3T(n-1) +2, 1(1) = 1. Answer: Tin) = 8°T(n—2) 4340242 =P T(n—3)43 42490242 = HT (a4) 49224376 2430242 BT (n— B43 oss 024 436742 Cer gre arr Semeete re) Pete: n-t z Consider a magnetic disk consisting of 16 heads and 400 cylinders. This disk has four 100-cylinder zones with the cylinders in different zones containing 160, 200, 240. and 280 sectors, respectively. Assume that each sector contains 12 bytes, average seek time between adjacent cylinders is 1 msec, and the disk rotates at 7200 RPM. Calculate the (a) disk capacity (b) maximum data transfer rate. Answer: First we get total number of sectors that is total number of sector = number of zones + (umber of sectors indifferent zones) Total number of sector = 100 » (160+200+240+280) = 88000 So, Disk Capacity {otal number of sectors * sizeof each sector TT JOB SOLUTION Question Bank Written —— Disk Capacity = 88000 * 512 = 45056000 bytes Here we know that for maximum transfer rate we will select cylinder with maximum number of sectors i.e here 280 sectors So, capacity of one track with maximum = 280 x 512 =143360 bytes and Number of rotations in 1 second is = 720° =120 So, Data transfer rate = Number of heads x Capacity of one track x Number of rotations in one second Data transfer rate = 16 x 143360 x 120 = 275251200 bytes per second = 262.5 GB per second U 1A file system with 300 GB uses a file descriptor with 8 direct block address. 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system. Answer: Total number of possible addresses stored in a disk block = 128/8 = 16 Maximum number of addressable bytes due to direct address block = 8128 Maximum number of addressable bytes due to 1 single indirect address block = 16128 Maximum number of addressable bytes due to 1 double indirect address block = 16*16*128 The maximum possible file size = 8128 + 16x128 + 1616x128 = 35KB 2. Construct a full binary tree from the given inorder and preorder traversal is as =. serial communication employing 8 data bits, a parity bit and 2 stop bits. What is the ‘minimum band rate requested to sustain a transfer rate of 300 characters per second? Answer: Transfer rate = Baud rate x (data bitsotl bits) 9300 «8=Bx (8/12) =32400=8xB/12. => B=3600 2400 < 3600 < 4800 band rate required would be 4800 here. Host A is sending data to Host B over a full duplex link. A and B are using the sliding ‘window protocol for flow control. The send and receive window size are 5 packets ‘each. Data packets (sent only from A to B) are all 1000 bytes long and transmission ‘time for such a packet is SOus. Acknowledgement packets (sent only from B to A) are small and require negligible transmission time. The propagation delay over the link is 200 us. What is the maximum achievable throughput in this communication? Answer: [Network throughput, = Window size / roundtrip time Roundtrip time, =2 Packet delivery time + processing delay = Transmission delay + 2 x propagation delay = 50 microsec + 2 « 200 microsec = 450 microsec Now, Throughput (Sx 1000x bytes)/4S0microsec) =IL.II11 x 108 bytes per second 6 Write a program to read a character "lower case " and convert it into upper case. Answer: finclude fefine MAX 100 void toggle (char * string); Ant main ( char string (MAX); print£("Enter the string need to be converted :\n"); gets (string) ; j toggle (string): printf ("Final string after convert is:\n"); Printé("%5\n", string); return 0; geet: + string) ( 1% ingti] !="\0") ( “Sf (etringLi} >= 'a’ ce stringli) << '2")( “string(i) = steing(i) - 32; Question Bank Written else if(string(i] >= 'A’ && string[i) <= '2')( stringlil= string(1) + 32; itty ) y c— a network with IP address 192.16.0.0 is divided into 2 subnets, find number of hosts per subnet. Also for the first subnet, find- @ First Subnet address (ii) First host address (iii) Last host address (iv) Broadcast address Answer: Here, given IP address in class C. So, 24 bit is Network bit and 8 bit is Host bit. Number of bits remaining for the host address is 7. Thus number of host per subnet is = 2’ = 128 i) Subnet address = First IP address = 192.16.0.00000000 = 192.16.0.0 (i) First host address = 192.16.0.00000001 = 192.16.0.1 (ii) Last host address = 192.16.0.01111110 = 192.16.0.126 (Gv) Broadcast address = Last IP address = 192,16.0,01111111 = 192.16.0.127 8. Database table by name Loan Records is given below: i Draw the k-map for the equation: F=A'B'C'D’+A'B'CD'+A'BCD'+A’BCD+ AB'C'D'+AB'CD'+ ABCD'+ABCD Answer: cD F=BC + ABD + ABD = BC + BD (Ans) 4 Consider a disk pack with the following specifications- 16 surfaces, 128 tracks per surface, 256 sectors per track and 512 bytes per sector. Answer the following questions (2) What is the capacity of disk pack? (b) If the format overhead is 32 bytes per sector, what is the formatted disk space? (© If the disk is rotating at 3600 rpm, what is the data transfer rate? Amswer: (@) Capacity of disk pack = Total number of surfaces x Number of tracks per surface ‘Number of sectors per track x Number of bytes per sector ee = 16 x 128 x256 x 512 bytes = 2* bytes Page | 453 Question Bank = 256 MB (b) Formatting overhead = Total number of sectors x overhead per sector '9 x 32 bytes Now, Formatted disk space = Total disk space - Formatting overhead (c) Number of rotations in one second = (3600 / 60) rotations/sec = 60 rotations/sec Written Now, Data transfer rate = Number of heads x Capacity of one track x Number of rotations in one second = 16 x (256 x 512 bytes) x 60 = 24 x 28 x 2° x 60 bytes/sec = 60 x 27! bytes/sec = 120 MBps (i) Average waiting time for FCFS (ii) Preemptive SJF (iii) Round Robin (Quantum time: 3) scheduling algorithm jer: [See Multiple Ministry, Assistant Programmer, Written Exam: 2016] . A want to send 2 files the size of each file is 500000 bit’s data to B through TDM channel which has slot 16 channel bit rate 1.5 Mbps and 30 millisecond delay time, if no propagation delay; find out time to send the data. Answer: Each circuit has a transmission rate of (1.5 Mbps)/16 = (1.5 x 10°/16 Kbps It takes = file size/transmission rate+ delay _ 2%500000x16 | 30 0 1.5x106 ffi 1000 aOre LL CLEC LL COMPACT IT JOB SOLUTION AOTTUJO® SOE TE Rammalens+ Question Bank written eee To = time, we have to add the time taken to establish the connection. That makes it 10.7 seconds. 5. Preorder and In-order sequence is given, Draw the binary tree and write a procedure ‘VLSM Subnetting. Given an IP address, 192.168.0.0/20 For creating 4 subnets department of A, B, C, D with 2000, 1000, 6000 and 8000 hosts, find out every ‘department first and last IP address. Also write the subnet mask of q.x.y.z/notation. Answer: Fill the following table is given below- Subnetting Table 192.168.7.255 | 255.255.248.0 192.168.0.1 192.168.7.254 255.255.252.0 192.168.8.1 192.168.11.254 255,255.224.0 | 192.168.12.1 | 192.168.43.254 255,255,224.0 | 192.168.44.1 | 192.168.75.254 Page | 456 Bank For 7 segments display the input is abedefg. When a decimal digit or value is display then its equivalent segment is high. a oe at 1”. oft on pee —— -| -| —'— @ Draw logic circuit for 2-to-4 Line Decoder/De-Multiplexer a Answer: Truth Table Dr Ds Ds Ds Dy Dr Dy Do S.salary and 5.aept name = von + Find the time and space complexity of BFS which has branch 4 branch and the target at level 5? If cpu can explore 10000 nodes per second find the time required and if the memory IKB find the required memory. Answer: Branching factor of BFS is (b*) where b is branch and d is the depth of the graph. So the ‘branching factor is O (4°) = 1024. 024 Required time: 2274 = 102ms ‘Space complexity: 0 (4°) = 1024 Find the output of the following program. You must show each staps. #include int main(){ int i =0, j=5, x=0, count=0; while (3>i){ if (=7) break; x=x+i+count; count=count+2; | ate; } printf ("i=td, count=%d",i, count); printf ("j=%d, x=%d",i, x); return 0; I 4=7, count=0=7, x=0 Question Bank Written, re ‘K dynamic IP address is an IP address that an ISP lets you use temporarily. If a dynamic address is not in use, it can be automatically assigned to a different device. Dynamic IP addresses are assigned using either DHCP or PPPoE. 4. Write a simple output C program to check odd-even number. “Answer: {See Bangladesh Computer Council, CA Monitoring System Project, Exam: 2021] 4. Making binary a tree from the given expression: 3+ ((5+9)*2) Answer: Q Died eae S._Write a C program for prime numbers between 1 to N. ‘Answer: [See Bangladesh Competition Commission, Programmer, Written Exam: 2019 (DU)] Difference between Switch, Hub and Router. ‘Answer: (See DESCO, Assistant Engineer (CSE), Written Exam: 2019 (BUET)) 9. Find the Value of ee | annvirus. | comparison to firewall, % A J6-QAM signal has 4 bits per signal unit since logo'® = 4. Thus, 10004 = 4000 bp We have four sources, each creating 250 characters per second. If the interleaved unit is a character and 1 synchronizing bit is added to each frame. Now find- (a) the data rate of each source. (®) the duration of each character in each source. Answer: (a) The data rate of each source is: 2508 = 2000bps = 2kbps (b) Each source sends 250 characters per second; therefore, the duration of each character is ood or 4ms signal bit per second bound rate 1000 and 16-QAM signal. 6. Write a C/Sava program to check Armstrong number or not. A nomaws (Cae Canali & Nevelooment Bank Ltd.. Senior Officer (IT), Written Exam: 2020 (DU)1 U ABCD + ABD + ABCD convert it into minimum lateral. Answer: = ABD (C + C)+ABD[- A+A = 1] = ABD+ ABD Find out the output of the following program. #include #include int main(){ int i=0, length; char string[] = "Hello\0 World!!"; length = strlen(string); char*s = string; for(i=0; i int main(){ int i,N; unsigned long sum; printf("Enter the value of N: "); scanf ("%d", &N) ; sum=0; for(i si<=N; i++) sum= sum+ (i*i); printf("Sum of the series is: %ld\n",sum); return 0; Enter the value of 100 Sum of the series is: 338350 . What is ERP? Write down the Implementation Challenges of ERP? DPDC (Technical part) JAM (ICT) Written Exam: 2020 (BUET) . and execution, what will be output in the following code: int main() ( int i=-3, j=1, k=0,m; m=t+i| [++i a6++k; printf ("%d, td, %d,%d",i,j,k,m) return 0; Howe iiac% wow Question Bank 2, Simply the following function: ABCD +ABD +ABCD Answer: =ABCD + ABCD +ABD = ABD (C + C)+ABD = ABD +ABD [- A+A=1] = BD(A+A) =BD 3. A, B two resources. Two processes (P1 and P2) share th Paice +24 94+... Answer: #include #includecmath.h> int main(){ int i,n,sum=0; printf ("Enter the value of n:"); scanf ("8d", én); for (i=1;icen; i++) ( sum=sumtpow (i, 1): +n® (where n>0). , printf ("Sun of series=$d", sum); return 0; } <2 Write dawn the output of following program: | #include int main(){ int i=0; for (i=0;1<20; i++) ( switch (i) { case 0: i4=5; sint£("$d", i); turn 0; enorvsrs 1d vids 3. geek be the output in C and java code? Output: program: #include 5 3 int main(){ 4 int al] = (5,3,4,2,1}¢ 2 int i; 1 for(i=0; i<10; i++) is. print£("%d\n", alil): Ze } 6356864 4198653 (ii) Java program: U re shows synchronous TOM with a data stream for each input and one data ‘the output. The unit of data is 1bit. Find (a) the input bit duration (b) the pit duration (c) the output bit rate and (d) the output frame rate. questions as follows: the inverse of the bitrate: 1/1 Mbps=l us. Bisbie ‘one-fourth of the input bit duration, or 1/4 us. Page | 553 Question Bank Written rere errr _aerreennr (c) The output bit rate is the inverse of the output bit duration or1/4 1s, or 4Mbps. This can also be deduced from the fact that the output rate is 4 times as fast as any input rate; so the output rate=4 x IMbps = 4Mbps. (d) The frame rate is always the same as any input rate. So the frame rate is 1,000,000 frames per second. Because we are sending 4 bits in each frame, we can verify the result of the previous question by multiplying the frame rate by the number of bits per frame. FE ee oa on ~= _ k BARUR foe So, after decrypting the Shift Cipher with key K=19 our fiend deciphers the cipher text DATG" into the message text "KHAN", AC PB + ABC+ ABC + RBC-+ ABC Sept eng K-aep wih logs creat Answer: ie a ee Goats ooo] 007 F=Ac+BC+BC @ al , bye) F=AC+BC+ p+ 4, Write a Program to check for balanced parenthesis in an expression. eppeacr TT JOB SOLUTION 1555 U ola IP Address 180.79.35.5/24, Find the (i) Network ieoriag a Subnet mask (iv) Total valid host (v) IP address Naw Adie: 180.79.35.0:24 Broadcast address: 180.79.35.255 =e Question Bank serene en (iil) Subnet mask 550500 c oe .00000000} (iii) Subnet mask: 255.255.255.0 CEDEDDDERUE OED ODDbeepece (iv) Total valid host: 28 — 2 = 254 (v) IP address class: C 2 wus | i: ‘What is the output of following code? Hinclude void main (){ char *f [] = ("Ronaldo", printf ("s\n", £(1]+2); print£("$s",£(2]+1); | , Output: ssi idan "Messi", "Zidan", "Maradona"}, str{20); 9. Answer the following question: . Polymorphism refers to 2 "Answer: the ability of variable, function or object to take on multiple forms. }. What is the simplest method to prove that a graph is bipartite? = Using two-color algorithm to color the vertices in a sample graph is the simplest for checking bipartite graph, - ¢, In C what is the correct syntax to a send a 3- dimension array as a parameter? # The simplest way is to just declare the parameter as char cube(N][NJ[N]; or char inside the function and the array will be passed by pointer. It’s called counter- and it works. The Size of the character variable in Cis_’ byte In Java what is true about private constructor? constructors are used to prevent creating instances of a class when there are fields or methods, such as the Math class or when a method is called to obtain an class. Page | 627 Written : = ‘ee AE eR ABI He TATA | Be eC rere cory fBfitcw era C Program #include ant main() ( int n, angle; printf("Enter the number of side:"); scanf("%d", &n); angle=((n-2) *180) /n; printf ("The Angle is: %d degree", angle); return 0; ) Coats the output of the following program? #define x 9+2/4*3-2*4+ (5-4) *3 int main() { int int y=6+343/5; i=x*xt+y; printf ( urn 0; a", i); a 10 1 0 7. eS I-bit full adder 407% 2-bit full adder Zeft | Answer: Ais two bit, Bis two bit, Result ‘5, Write down difference between TCP and UDP with write down some TCP and UDP protocols. ‘Answer: Difference between TCP and UDP is given below. | "TCP is a connection-oriented protocol. | UDP is the Datagram Connectionless | protocol | TCP is reliable as it guarantees delivery of | The delivery of data to the destination data tothe destination router. cannot be guaranteed in UDP. "TCP provides extensive error checking | UDP has only the basic eror checking _mechanisms, ‘mechanism using checksums. TCP header size is 20 byes. ‘UDP Header size is & bytes. TCP is heavy-weight. UDP is lightweight ‘TCP is used by protocol HTTP, HTTPs, | UDP is used by protocol DNS, DHCP, FTP, SMTP and Telnet TTETP, SNMP, RIP and VoIP. | +4 Find the subnet and host number of 255.255.240.0 Answer: ‘Subnet number: 2 = 16 [Because of complete 3° octet 4-bit required] Ts ‘Number: 2-2 = 4094 [Because host is 12) 7. Find the output of the following code: int a=3;int b=10; i£ (a>) * Einte ("A"); else Prints ("5"); 4-0; int n=3; (ian) ( i£(4=3) “continue; mid i Question Bank wr ace een mance mae ne, Answer: Output: 0 1 2 9. Give answer of the following question: a) IP address converted into physical address Answer: ARP (address Resolution Protocol) b) Name are converted into domain name Answer: Domain Name System (DNS)

You might also like