Skip to main content


Showing posts from November, 2004

C# Operator Precedence

Table 3.3 Operator Precedence
Level Operator Types Operators
1 Primary operators -() . [] x++ x-- new typeof sizeof checked unchecked
2 Unary + - ! ~ ++x --x
3 Multiplicative * / %
4 Additive + -
5 Shift << >>
6 Relational < > <= >= is
7 Equality == !=
8 Logical AND &
9 Logical XOR ^
10 Logical OR |
11 Conditional AND &&
12 Conditional OR ||
13 Conditional ?:
14 Assignment = *= /= %= += -= <<= >>= &= ^= |=
Q: What are the differences between sanity testing, smoke testing,
regression testing, and monkey testing?

A: First, quite often the terms are not used correctly and you should learn
the meaning of the terms where you work and try to help adjust them to
industry norms. However, these terms may be used differently in your
company since there are no formal standards for them, and most people
wouldn't bother to learn the actual definitions if they existed.

Smoke tests get their name from the electronics industry. The circuits are
laid out on a bread board and power is applied. If anything starts smoking,
there is a problem. In the software industry, smoke testing is a shallow
and wide approach to the application. You test all areas of the application
without getting too deep. This is also known as a Build Verification test
or BVT.

In comparison, sanity testing is usually narrow and deep. That is they look
at only a few areas but all aspects of that part of the application. A
smoke te…

Common 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];
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?
An abstract class may have fields a…