Networking Job Interview Questions

Q1. Name of seven layers in Open System Interconnection model.

A. They are Application, Presentation, Session, Transport, Network, Data link, and Physical.

Q2. What is the time complexity of matrix multiplication ?

void Mult_Matrix(matrix A, matrix B, matrix C)
{
int i, j, k;
for ( i = 1; i < N; i++)
for ( j = 1; j < N; j++ )
{
C[i][j] = 0;
for ( k = 0; k < N; k++ )
C[i][j] = A[i][j]*B[k][j];
}
retrun;
}

A. The time comlexity of matrix mulitiplication is O(N^3)

Q3. What is the null pointer in C++ ?

A. The null pointer is a special C++ pointer value that can be used for any pointer that doesn’t pointer anywhere. It can be written as the constant NULL form stlib.h

Q4. What is the goal of the shortest distance algorithm ?

A. The goal is to completely fill the distance array so that for each vertex v, the value of distance[v] is the weight of the shortest path from start to v.

Q5. What is the difference between an abstract class and an interface?

A.

An abstract class may have fields and some implemented methods.

An interface has no implementation; only constants and method declarations.

No comments:

Post a Comment