I read here that Intel introduced SSE 4.2 instructions for accelerating string processing. Quote from the article: The SSE 4.2 instruction set, first implement
I recently encounter a problem when I'm using netlink to transfer many data between userspace and kernelspace. For example, function in userspace releases a req
I have a 2D array called char **str (allocated by malloc). Lets say str[0] has the string "hello". How would I print that hex? I tried printf("%d\n", (unsigned
i'm reading an article about integer security . here's the link: http://ptgmedia.pearsoncmg.com/images/0321335724/samplechapter/seacord_ch05.pdf In page 166,th
It looks like it could have been, there are (at least in C99) length modifiers that can be applied to int: %hhd, %hd, %ld and %lld mean signed char, short, long
I am working on an STM32F407 Discovery Board. But I didn't solve my clock configuration problem. I want to 168 MHz working frequency and I get help from CubeMX
I'm testing a network program that sends packet to a remote server using UDP/TCP, and for that, I want to generate some random byte streams. Here's the functio
I could not find something like OFF_MAX that would tell me the maximum allowed value for off_t so I wonder if I could perhaps use that: #define OFF_MAX ~((off_
I'm looking for an approximation of the natural exponential function operating on SSE element. Namely - __m128 exp( __m128 x ). I have an implementation whic
Here is the question: Write a solution that only iterates over the string once and uses O(1) additional memory, since this is what you would be asked to do duri
I am trying to write code that wraps a C library in python. I am planning on using CTypes to do it and I used visual studio to compile my DLL. I started with a
I am just creating a basic file handling program. the code is this: #include <stdio.h> int main() { FILE *p; p=fopen("D:\\TENLINES.TXT","r"); if(p==0) {
I cannot find any reference on how to pair a bluetooth device on linux in a program written in C using the BlueZ Bluetooth libraries. I already managed to do a
How to get a list of child process ID's from a given parent process ID in a cross-platform manner in C and C++ without using command line? I provided an answer
I know that is a simple question but I couldn't find the answer. I have this string: "M1[r2][r3]" I want to get only the "M1", I'm looking for something li
How do I calculate a power in C, and do you have to include anything? I have tried to include math.h, however it didn't work. What is de difference between a in
i am currently trying to make a programm which will print the sentece "What a wonderful world" using three threads. The first thread should print "What A" , the
I took a class of programming at my university and I am working on some program. I want to know if it is possible to program my own kbhit() function. And if it
I've written a function trailing_zeroes(int n) that returns the number of the trailing zeroes in the binary representation of a number. Example: 4 in binary is
In unix/linux world, there are a couple of different C Standard Library implementations to choose from and link against, but although I spent some time searchin