Skip to main content
0 votes
0 answers
9 views

Encountering an issue in SASM XMM0

The following is my SASM x86-64 code: section .data promptInput db "Enter two doubles: ", 10, 0 scanformat db "%lf", 0 printOpeOne db "OperandOne: %lf", 10, 0 ...
VVV's user avatar
  • 1
-2 votes
0 answers
47 views

Additional sources files in CMake project compile, but their functions are not executed [closed]

The goal is to modify a Zephyr example project by adding in my own source files. The paths to the source files are added to the project CMakeLists.txt file as so: target_sources(app PRIVATE src/main....
Christopher Theriault's user avatar
-4 votes
2 answers
113 views

Array reassignment in while loop condition [closed]

I had a question on my recent exam about array values reassignment in while loop condition. Q: What is the value of array a after program execution? Code: boolean a[] = {true, false,true,false}; ...
MarkoJ's user avatar
  • 15
4 votes
2 answers
38 views

Lex Setup Correctly Validating Assignments but not Expressions

I recently revisited an old assignment that I did not get to work and I am still curious as to why it isn't. This assignment was to create a lex regular expression in C that would validate both ...
Julio Garcia's user avatar
2 votes
0 answers
65 views

Linux: Low-level management of virtual memory - collaboration between processes

If I were to mmap() a very large file (for read-only access) pages would be read-in, by the kernel, after a page fault indicates that the page is not already cached in RAM. Pages will remain cached ...
aSteve's user avatar
  • 2,056
2 votes
1 answer
69 views

How to wrap an already weak function?

Say I have a lib provided by a HAL that defines weak IRQHandlers, and builds an interrupt table (in this MRE, a single function ptr g_IRQHANDLER): // lib.c #include <stdio.h> void IRQHandler(...
SamBob's user avatar
  • 995
4 votes
2 answers
122 views

Differentiating pointer declaration and multiplicative expression

According to the C language grammar defined in the standard, how will the statement a * b; be parsed? Is it considered as a declaration of a pointer b to an object of type a? Or is it considered as an ...
alexisrdt's user avatar
  • 406
1 vote
3 answers
70 views

How do I update an address with a constant minus an address in a circular buffer

I have pointer into a delay line that I wish to update. If the pointer (p) goes past the end of the buffer, I wish to wrap around to the start plus some value. _Complex float buffer[BUF_LEN]; ...
james's user avatar
  • 21
2 votes
2 answers
102 views

Why does my function replace my letters with weird characters?

I'm a student and I'm currently learning C basis. My goal is to "recreate" the strcat() function without librairies Here is what I tried: #include <stdio.h> char *ft_strcat(char *...
superlemon's user avatar
2 votes
0 answers
70 views

C++'s virtual methods implementation in C [duplicate]

In C++, I can create an array of pointers to a base class and call overridden methods, my goal is to mimic this type of behavior: Animal* zoo[3]; zoo[0] = new Cat("Whiskers"); zoo[1] = new ...
Berserk0204's user avatar
0 votes
0 answers
42 views

What is the best way to listen to battery events (charger plugged in, percentage change) in linux? [closed]

I want to blockingly listen to battery events. Why not poll the sysfs? Firstly, sysfs doesn't notify of any events; only some specific types of interfaces, if any at all, have the ability to be ...
dqvid's user avatar
  • 59
2 votes
3 answers
129 views

how to force compiler error with strcpy() when destination is const

How can I make the strcpy() function trigger a compiler error when the destination is a const pointer? The prototype is strcpy(char *dest, const char *src) however if I specify a const char * for ...
Richard Chambers's user avatar
2 votes
0 answers
30 views

Why I can't create a pixmap from the PDF page after reading and dropping resources (muPDF, C)?

My program written in C with muPDF reads a page from PDF-file (1 page = 1 image, no text on the page) and creates a pixmap from the page. It works well. But if I read resources before creating pixmap ...
LUN's user avatar
  • 307
-4 votes
0 answers
67 views

C compilation issue on Linux [closed]

We have moved from HP-UX to Linux and hence need to recompile the C code. I am getting an error usr/bin/ld: can not find -lcl Can you where we can find this library and why it is missing on Linux. ...
user31056936's user avatar
1 vote
3 answers
134 views

Inputting to a cstring of undefined size without wasting memory

I know beginner level C++. In C++ when I want to, for example. input the user's name, all I need to dos is: getline(cin,str); but I am trying to learn C.( I want to play with kernels and embedded ...
Zulqarnain Bin Asif's user avatar

15 30 50 per page
1
2 3 4 5
27201