Category "c"

Strange warning when calling sprintf with .* width specifier

For the following code: https://godbolt.org/z/WcGf9hEs3 #include <stdio.h> int main() { char temp_buffer[8]; double val = 25.3; sprint

Yacc generated C file sccsid warning supression

I am working on a legacy project that uses yacc - 1.9 20130304. The generated .c files contain the sccsid string (from the skeleton.c): #ifndef lint static cons

net/rime.h error using Cooja, how can I install it but not just download it?

I am trying to do a simple simulation in Cooja (literally the example on the Contiki website here). However I have an error message linked to my #include "net/r

Difference between printf and ESP_LOGI?

I just want to know, what is the difference between esp's ESP_LOGx and printf, related to memory use and its other features. And which is the best to use for lo

Select build type at conan build step

This is a simple need of selecting build type when calling conan build. Normally we have to call conan install with the desired build type and then conan build

Can we unit test memory allocation?

I have to test a library that provides its own memory allocation routine: void* allocation_routine(size_t size) throw(); Documentation states that this funct

why is the output 1 in this case and when i am doing t-p then its giving me -1

As you can see it is giving me 1 but why? When i do t-p then it gives me -1 . Why ? int f=4, o=8; int *p, *t; p = &f; t = &o; printf("Difference betwee

How to establish semaphore between two different files and synchronize data

I am currently working on semaphore concepts ,. I Have two files I have to share data between two files Eg : application1.c It increments one value and shares t

What types of error when using the wrong format specifier in printf

Floating-point format specifier is used in printf by the argument has a integer number. What kind of error is it? Is it a run-time error or a syntax error? erro

Error "assignment from incompatible pointer type" when creating a Netfilter kernel module

I'm implementing a "mini firewall" and use the filter function with the signature shown below: unsigned int minifw_inbound_filter(unsigned int hooknum, struct s

What is the use of the data type 'intp' in NumPy?

I've seen the data types in the NumPy package of Python, but I found the description of the data type 'intp' a bit confusing. Its description is like: intp: Int

Is there a kernel mode API that allows safe access to ntoskrnl.exe address space

I'm just playing around for fun only(on Windows 8.1) with kernel mode address space trying to see if I can access the address space belonging to ntoskrnl.exe fr

Bandwidth estimation : adding RTCP header extension - Gstreamer C

I am writing an application that uses Gstreamer to stream video between two clients. To do that, I wrote two codes in C that implement a sending pipeline and a

What is je_free function in libc.so?

Could somebody please explain me what is je_free function defined in libc.so and when is it called? Note1: while investigating one crash reported in our applica

Generate BackSpace event gtk/C

In GTK/C, I want to propagate the backspace keypress to a button clicked. Following the suggestion in this previous post, I tried with a small program: create a

how to find the dependencies of a source code?

Let say I have a simple c-library project, the layout is as follows - src/ - square_root.c - log.c - power.c - newton_method.c - include

How to detect non IEEE-754 float, and how to use them?

I'm writing classes for basic types, so that code is logically the same on multiple platforms and compilers (like int_least16_t for int). For fun! (I'm still a

Adding two double precision floats in assembly language in C on a Raspberry Pi 4 with 64 bit Linux

I am learning ARMV8 assembly language on my raspberry pi 4 and I want to know the simplest way that I can add two floats whilst choosing which registers I use t

What does this i386 os code mean? The code is for resetting the system

/* jump to reset vector. esp := 0 */ int main(int argc, char **argv) { PRINT("reset\n"); _eflags = 0; // interrupt disabled __asm__ __volatile__ ("\

cs50 filter(blur) assignment (pset4)

I am doing a cs50 assignment filter(blur). i didnt do it really well but it is working. bluring all the pixels except the first row(north) and the final row (so