SCSI Read10 vs Read16?

Which case would be considered correct? Doing reads with a Read 16 command no matter if the LBA's are 32 or 64 bit...

How to malloc char** table??

I am trying to malloc and free a small array/table of single letter strings. I know that this can be done in an arr...

What are the rules for casting pointers in C??

K&R doesn't go over it, but they use it. I tried seeing how it'd work by writing an example program, but it didn...

Chained Hash Tables vs. Open-Addressed Hash Tables?

Can somebody explain the main differences between (advantages / disadvantages) the two implementations? For a libra...

Invalid write of size 8, C Valgrind, string arrays?

I have been using both valgrind and gdb and I can not quite figure out what the problem is. It hops around too much ...

ARM Assembler - How do I use CMP, BLT and BGT??

Quick question for you guys, in my loop I need to use CMP , BLT and BGT to compare some values. How would use said i...

Mod of power 2 on bitwise operators??

How does mod of power of 2 work on only lower order bits of a binary number (1011000111011010)? What is this number...

Computing the inverse of a matrix using lapack in C?

I would like to be able to compute the inverse of a general NxN matrix in C/C++ using lapack. My understanding is t...

Can I display the value of an enum with printf()??

Is there a one-liner that lets me output the current value of an enum? ...

How can I print a quotation mark in C??

In an interview I was asked Print a quotation mark using the printf() function I was overwhelmed. Even in thei...

Generate Ascii art text in C?

I am trying to generate ascii art text for a fun application. From FIGLET, I got the ASCII pattern. I am using that ...

Convert ascii char[] to hexadecimal char[] in C?

I am trying to convert a char[] in ASCII to char[] in hexadecimal. Something like this: hello --> 68656C6C6F I...

Why would you use `extern void my_func();` rather than including `my_utils.h`??

I'm working on some code I didn't write and noticed that there are many extern void my_func();. My understanding is...

Read int values from a text file in C?

I have a text file that contains the following three lines: 12 5 6 4 2 7 9 I can use the fscanf function to read ...

Convert char array to string use C?

I need to convert a char array to string. Something like this: char array[20]; char string[100]; array[0]='1'; arr...