Can sizeof(size_t) be less than sizeof(int)? Do the C and/or C++ standards guarantee that using unsigned int for array indexing is always safe?
I am trying to print some floating point numbers using printf. For example: int main() { printf("%.1f",76.75); return 0; } Output: 76.8 And I have som
I want to create a UDP socket connection to receive data from GStreamer udpsink. When I create a Gstreamer pipeline using udpsink, VLC can play the stream. I wa
How can affect on my app's status icon label in Gnome3? When i moving cursor on it shows me my app's executable name. How can I change it?
When I wish to check if a value is 0 in C, how is it idiomatically done? if (!num) if (num == 0)
I could not find a direct answer to this but is it possible to force a certain kind of data type for an enum in C ? e.g I have an enum for a state machine that
If I build a module which depends on other modules, and i get this warning: 'function or symbol ?' [source dir/my_module.ko] undefined! What does the warn
How do you check whether a path is absolute or relative, using C on Linux?
Forward declaration of enums in C does not work for me. I searched the internet and Stack Overflow but all of the questions regarding forward declarations of en
Why does the indexing in an array start with zero in C and not with 1?
Hello i am new to ubuntu. I want to run a c program in ubuntu.On the terminal i typed "make ex1.c" (my file name is ex1) and the after pressing enter button , t
I have just had a lecture that sums reaping as: Reaping Performed by parent on terminated child (using wait or waitpid) Parent is given exit status informato
This error stops my kernel make process ld: arch/x86/entry/syscall_64.o:(.rodata+0x1120): undefined reference to `__x64_sys_fd' BTF .btf.vmlinux.bin.o pahol
I am writing a unit test for embedded C codes using google test/mock. The C function code looks like this. int readGPIOSysfs(int ioport){ ... FILE *f = fop
I am having a problem in the synchronisation of threads. I m trying to implement sleeping barber problem in a different approach. When i run the code the thread
I'm working on a 2 pass assembler and have been looking at sample codes online to familiarise myself. I found the following code but there appears to be a probl
I'm working on a 2 pass assembler and have been looking at sample codes online to familiarise myself. I found the following code but there appears to be a probl
I created my version of strlen() function. unsigned int my_strlen(char *p) { unsigned int i = 0; while(*p!='\0') { i++; p++; }
Let's say that I declare a C struct called foo, which has an int field called bar and a char * called baz. How do I use the Cmocka expect_ and check_expected m
When I try to determine end of file with function feof(FILE *), I find it does not work as I expected: an extra read is required even if the stream does end. E.