Você está na página 1de 8

A device that connects two dissimilar networks and performs the protocol conversion

Which of the following devices assigns IP address to devices connected to a network


that uses TCP/IP?
a. DHCP Server (ANS)
b. NIC
c. Gateway
d. Hub

Networking MCQ Test � 2

Que.1. A network router joins two _________ together?


A: Computers
B: Switches
C: Networks
D: Gateway

Right Answer: C

Que.2. What is the other types of OLAP apart from ROLAP?


A: HOLAP
B: MOLAP
C: DOLAP
D: Both a and b above

Right Answer: B

Que.3. ____________ assigns a unique number to each IP network adapter called the
MAC address.
A: Media Access Control
B: Metro Access Control
C: Metropolitan Access Control
D: Both b and c above

Right Answer: A

Que.4. What is the full form of CAN?


A: Campus Area Network
B: Cluster Area Network
C: Control Area network
D: both a and b

Right Answer: D

Que.5. Dynamic addressing doesn't allow many devices to share limited address space
on a network
A: True
B: False

Right Answer: B

Que.6. ARP works on Ethernet networks.


A: False
B: True

Right Answer: B

Que.7. __________ is a standard suite of protocols used for packet switching across
computer networks.
A: x.22
B: x.23
C: x.25
D: x.26

Right Answer: C

Que.8. NAT stands for


A: network address transformer
B: network address translator
C: network address translation
D: Both b and c above

Right Answer: C

Que.9. Piconets in blue tooth a minimum of two and a maximum of ____________


Bluetooth peer devices.
A: five
B: eight
C: nine
D: four

Right Answer: B

Que.10. Which of the following below is/are capability of ICMP protocol?


A: Report package count
B: Report network congestion
C: Both b and d
D: Report availability of remote hosts

Right Answer: C

Que.11. What is the full form of URL?


A: Uniform routing locator
B: Uniform Resource locator
C: Universal Resource locator
D: Uniform router locator

Right Answer: B

Que.12. The process of assigning IP address for specific times to the various hosts
by DHCP is called as?
A: Lend
B: sublease
C: let
D: Lease

Right Answer: D

Que.13. In 10base2, 10base5, what does 2 and 5 stand for?


A: Speed in mbps
B: Number of segments
C: Length of segment
D: Size of segment

Right Answer: B

Que.14. Which of the following below are secure VPN protocols?


A: UDP
B: TCP
C: SSTP
D: Both b and c

Right Answer: D

Que.15. Which of the following below is a loop back IP address?


A: 127.0.0.0
B: 127.0.1.1
C: 127.0.1.0
D: 127.0.0.1

Right Answer: D

Que.16. 10Base5, 10Base2, 10BaseT are types of?


A: Internet
B: LAN
C: Ethernet
D: Cables

Right Answer: C

Que.17. When computers in a network listen and receive the signal, it is termed as
active toplogy
A: True
B: False

Right Answer: A

Que.18. Which of the following is true for secure shell tunneling?


A: To set up an SSH tunnel, one configures an SSH client to forward a specified
local port
B: SSH tunnels provide a means to not bypass firewalls
C: All SSH clients support dynamic port forwarding
D: Both a and b

Right Answer: A

Que.19. Message Oriented Middleware allows general purpose messages to be exchanged


in a Client/Server system using message queues.
A: True
B: False, it works based on stacks

Right Answer: A

Que.20. What is the difference between a switch and a hub?


A: Switches operate at physical layer while hubs operate at data link layer
B: Switches operate at data link layer while hubs operate at transport layer
C: Switches operate at data link layer while hubs operate at physical layer
D: Switches operate at transport layer while hubs operate at physical layer

Right Answer: C

C MCQ Test - 3
Que.1. If the size of integer is 4bytes, What will be the output of the program?
#include<stdio.h>
int main()
{
int arr[] = {12, 13,14,15,16};
printf("%d, %d, %d",sizeof (arr),sizeof(*arr),sizeof(arr[0]));
return 0;
}

A: 16, 2, 2
B: 20, 2, 2
C: j=s;
D: *j=s;

Right Answer: B

Que.2. Are the following two statement same?

1.a <= 20 ? (b = 30): (c = 30);


2.(a <=20) ? b : (c = 30);

A: Yes
B: No
C: True
D: False

Right Answer: B

Que.4. What will be the output of the program ?


#include<stdio.h>
int main()
{
int i;
char a[] ="";
if(printf("%s", a))
printf("The string is empty");
else
printf("The string is not empty");
return 0 ;
}

A: No output
B: 0
C: 1022 Hello2
D: Hello1 1022

Right Answer: B

Que.5. What will be the output of the program?


#include<stdio.h>
int main()
{
int i=4, j=-1, k=0, w, x, y, z;
w = i || j || k;
x = i && j && k;
y = i || j &&k;
z = i && j || k;
printf("%d, %d, %d, %d", w, x, y, z);
return 0;
}

A: 1, 1, 1, 1
B: 1, 1, 0, 1
C: 1, 0, 0, 1
D: 1, 0, 1, 1

Right Answer: D

Que.6. Can I increase the size of dynamically allocated array?

A: No
B: cmp - is a pointer to an void function type.
C: cmp - is a void type pointer function.
D: cmp - is a function that return a void pointer.

Right Answer: A

Que.7. Will the following program print the message infinite number of times?
#include<stdio.h>
#define INFINITELOOP while(1)
int main()
{
INFINITELOOP
printf("HelloWorld" );
return 0;
}

A: Yes
B: No
C: 10
D: 20

Right Answer: A

Que.8. In the following program add a statement in the function


fact()such that the factorial gets stored in j

#include<stdio.h>
void fact( int*);
int main()
{
int i= 5;
fact(&i);
printf("%d", i);
return 0;
}
void fact(int *j)
{
static int s=1;
if(*j!=0)
{
s = s**j;
*j = *j-1;
fact(j);
/* Add a statement here */
}
}
A: *j=&s;
B: &j=s;
C: 65486, 65488
D: 65486, 65486

Right Answer: B

Que.9. What will be the output of the program ?


#include<stdio.h>
int *check(static int,static int);
int main()
{
int *c;
c = check(10,20);
printf("%d", c);
return 0;
}
int *check( static int i, static int j)
{
int *p, *q;
p = &i;
q = &j;
if(i >= 45)
return (p);
else
return (q);
}

A: Error: Non portable pointer conversion


B: Error: cannot use static for function parameters
C: 10, 2, 4
D: 20, 4, 4

Right Answer: D

Que.10. What will be the output of the program if the array begins at address
65486?
#include<stdio.h>
int main()
{
int arr[] = {12,14,15,23,45};
printf("%u, %u", arr, &arr);
return 0 ;
}

A: 65486, 65490
B: 65486, 65487
C: The string is empty
D: The string is not empty

Right Answer: B

Que.11. What will be the output of the program?


#include<stdio.h>
typedef struct error {
int warning, err, exception;
} ERROR;
int main()
{
ERROR e;
e.err=1;
printf("%d", e.err);
return 0;
}

A: strnchar()
B: strchar()
C: strrchar()
D: strrchr()

Right Answer: B

Que.13. If the different command line arguments are supplied at different times
would the output of the following program change?
#include<stdio.h>
int main(int argc, char **argv)
{
printf("%d", argv[argc]);
return 0;
}

A: 10
B: 11
C: No output
D: Error: ++needs a value

Right Answer: B

Que.14. What will be the output of the program ?


#include<stdio.h>
int main()
{
char *str;
str = "%d";
str++;
str++;
printf(str- 2,300);
return 0;
}

A: Yes
B: No
C: 65474, 65476
D: 65480, 65496

Right Answer: D

Que.16. How many times "HelloWorld" is get printed?


#include<stdio.h>
int main()
{
int x;
for(x=-1; x<= 10; x++)
{
if(x <5)
continue;
else
break;
printf("HelloWorld");
}
return 0;
}

A: Infinite times
B: 11 times
C: 0 times
D: 10 times

Right Answer: C

Que.17. Macros have a local scope.

A: No output
B: 30
C: 3
D: 300

Right Answer: B

Que.18. What will be the output of the program?


#include<stdio.h>
int addmult(int ii,int jj)
{
int kk, ll;
kk = ii + jj;
ll = ii * jj;
return (kk, ll);
}
int main()
{
int i=3, j=4, k, l;
k = addmult(i, j);
l = addmult(i, j);
printf("%d, %d", k, l);
return 0;
}

A: 12, 12
B: 7, 7
C: 7, 12
D: 12, 7

Right Answer: A

Você também pode gostar