C++ Archive

How to accept objects as function arguments

Like variables, objects can also be passed using pass-by-value, pass-by-reference, and pass-by-address. In pass-by-value we pass the copy of an object to a function. In pass-by-reference we pass a reference to the existing object. In pass-by-address we pass the address of an …

How to create a sub structure in C Programming

In C, structures can be nested. A structure can be defined within in another structure. The members of the inner structure can be accessed using the variable of the outer structure as shown below: 1 outer–struct–variable.inner–struct–variable.membername An example for a nested structure …

What is the use of mutex lock for integer variables

As in many other computer architectures, in x86 memory access is fairly slow. To give you some perspectives, accessing register in CPU takes roughly .5 nano-second. Changing value in main memory take roughly 100 nano-seconds. That’s 200 times slower than usual. There is number …

Like the article? please consider sharing it. Thank you

Advertisment ad adsense adlogger