What does ** do in C language?

In C arguments are passed by values. For example if you have an integer varaible in main and the following function then if you call the function in main like this then the parameter gets the value of variable x in main. However the parameter itself occupies a different extent in memory than the argument. So any … Read more

What does it mean to write to stdout in C?

That means that you are printing output on the main output device for the session… whatever that may be. The user’s console, a tty session, a file or who knows what. What that device may be varies depending on how the program is being run and from where. The following command will write to the … Read more

C – The %x format specifier

Break-down: 8 says that you want to show 8 digits 0 that you want to prefix with 0‘s instead of just blank spaces x that you want to print in lower-case hexadecimal. Quick example (thanks to Grijesh Chauhan): Output: Also see http://www.cplusplus.com/reference/cstdio/printf/ for reference.

Converting a C program to MIPS

Currently you’re generating code for x86-64 – you need to select a MIPS compiler from the popup menu above the assembly pane: After you’ve done that you’ll probably see generated code like this: Note that the compiler has optimised away some of the redundant operations in the original C code. If you want to see an … Read more

Bitwise operation |= in C

| performs a bitwise OR on the two operands it is passed. For example, If you look at the underlying bits for 0x0A and 0x50, they are 0b00001010 and 0b01010000 respectively. When combined with the OR operator the result in b is 0b01011010, or 0x5A in hexadecimal. |= is analogous to operators like += and -= in that it will perform a bitwise OR on the two operands then store the result in … Read more

Does connect() block for TCP socket?

There’s hardly any “immediately” regarding networking, stuff can be lost on the way, and an operation that should be performed immediately in theory might not do so in practice, and in any case there’s the end to end transmission time. However connect() on a TCP socket is a blocking operation unless the socket descriptor is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)