Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [c]

C is a general-purpose programming language used for system programming (OS and embedded), libraries, games, and cross-platform. This tag should be used with general questions concerning the C language, as defined in the ISO 9899 standard (the latest version, 9899:2018, unless otherwise specified — also tag version-specific requests with c89, c99, c11, etc.). C is distinct from C++, and it should not be combined with the C++ tag without a specific reason.

-1 votes
1 answer
45 views

Small differences between scipy.fft (Python) results and FFTW (C) results [closed]

I am trying to recreate a result using FFTW in C from some known working code in scipy.fft in Python. I am finding small inaccuracies in my results. My input data is real 3d with dimensions = (294, ...
Barry's user avatar
  • 273
1 vote
2 answers
109 views

Why doesn't `char` lose data when an `int` is being assigned to it?

I'm a novice C programmer. I defined two variables int x = 0xffffffff and char y = x, thereafter I printed that using the printf("%x\n", y) function; I was expecting something like ff on the ...
Greeshma's user avatar
0 votes
0 answers
27 views

Tobii Eye Tracker 5 C API Callbacks

I have a Tobii Eye Tracker 5 and I'm using the C API. The concept validation tool works without troubles, I can print my devices serial id, gaze output frequency, and so on. The notification callback ...
AvidOwl628's user avatar
2 votes
2 answers
57 views

Using printf from c in Nasm causes the string to add random end line statment

this morning i tried to make a simple output library for my asm projects, i realized using the sys call each time is a waste of time and so i decided to automatize the program using printf function ...
Hrodebert's user avatar
-1 votes
0 answers
24 views

How to use libmnl to scan access points? [closed]

My question is similar to this one: Using nl80211.h to scan access points. But the difference is that I would like to use libmnl and not libnl. Would someone write an example of using libmnl and ...
Artyom Gevorgyan's user avatar
1 vote
0 answers
48 views

How to make CLion recognize linux/init.h and other linux kernel headers?

I am trying to do some Linux Kernel programming with CLion. I observe that some headers, like <linux/kernel.h> and <linux/module.h> are correctly recognized, but some others, like <...
G. Ianni's user avatar
2 votes
1 answer
114 views

array of pointers to pointers to integers VS pointer to pointer to array of integers

I have 3 integers A, B & C from which I make pointers that I group in an array arrayABC of pointers to pointers: int A = 1; int B = 2; int C = 3; int *ptA = &A; int *ptB = &B; int *ptC = &...
Steens's user avatar
  • 128
3 votes
2 answers
117 views

Widespread use of non-portable `void **` casts

I believe the following code is well-defined according to the C standard: void f(void **); void *p; f((void **)&p); But what if p isn't a pointer to void, say: void f(void **); double *p; f((void ...
emron's user avatar
  • 43
0 votes
0 answers
40 views

How to shift bits in unsigned long long [closed]

I have created a function in my C application intended to return values like "1.25GB", "4.60MB", "1.40KB" rather than the numeric values they represent (I hope I said ...
Dennis 's user avatar
  • 1,120
-3 votes
0 answers
35 views

Can someone explain how this works properly ? I am really confused how output works in C [duplicate]

Code: #include <stdio.h> int main() { int a = 2, b = 1, c = 0; c = a++ + b; printf("%d,%d,%d,%d,%d,%d", ++a, ++b, c++, ++c, b++, a++); return 0; } Output: 5,3,4,...
CY_B0T's user avatar
  • 1
1 vote
1 answer
51 views

Why address of the files stored on disk (of vbox vm) are different each time i look at them?

I am aware of ASLR which loads the program at different memory locations each time, however, I am not sure why this is happening in the case of files that I have stored on disk /dev/sda2 of my Linux ...
Mheboobkhan's user avatar
1 vote
0 answers
55 views

No compile time errors or warnings are being shown on my terminal window in vs code

I am using c language and I am working on windows using gcc compiler..I have also installed extensions like code runner and c\c++ Microsoft one too. For example, If I put an assignment operator in the ...
Jasmeet Kaur's user avatar
1 vote
0 answers
27 views

Python C++ extension DLL is not imported in python interpreter

I have written a Python extension in C/C++ to wrap my code for Python. I followed CPython documentation in the parts of C/C++ functions each module should provide For example, my module contains: /* ...
girl_coding's user avatar
0 votes
2 answers
46 views

YAML validation using JSON schema in C or Fortran program

I have a Fortran program that uses bind(c) and some wrappers written in C to use libyaml to read/parse a YAML file at runtime. This part of the program is a combination of Fortran and C code. ...
byrdman1982's user avatar
0 votes
0 answers
41 views

Issue with Writing to Flash Memory on STM32WLE5 After Receiving LoRa Data

I’m working with an STM32WLE5 microcontroller, using code generated by STM CubeMX. My project incorporates LoRaWAN modules, follows the EndNode skeleton, and utilizes FreeRTOS (CMSIS V2.0). The common ...
Ignacio Islas's user avatar

15 30 50 per page