-
-
-
-
-
-
-
Overload subscript operator
How will you Overload subscript operator with more than one dimension?
-
-
-
-
Can you add pointers together? Why would you?
No, you can’t add pointers together. If you live at 1332 Lakeview Drive, and your neighbor lives at 1364 Lakeview, what’s 1332+1364? It’s a number, but it doesn’t mean anything. If you try to perform this type of calculation with pointers in a C program, your compiler will complain. The only time the addition of pointers might come up is if you try to add a pointer and the difference of two pointers....
-
What is the difference between far and near?
As described at the beginning of this chapter, some compilers for PC compatibles use two types of pointers. near pointers are 16 bits long and can address a 64KB range. far pointers are 32 bits long and can address a 1MB range. near pointers operate within a 64KB segment. There’s one segment for function addresses and one segment for data. far pointers have a 16-bit base (the segment address) and...
-
-
-
Matrix Manipulation library in C
Let's say you want to develop a Matrix manipulation library in pure C (not C++). For example, you want to define a "matrix_multiply" function to get A * B, how to declare the function and how to implement it? Make sure that you consider error handling stuff, e.g., a 2*2 matrix and a 3*3 matrix cannot multiply, and how to detect and deal with the situation when you pass a 3*3 matrix as a parameter which...
-
-
-
-
-
C Interview Questions
Ans