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 absent a rational reason.

-12
votes
0answers
42 views

I want to print Hello World and I followed tutorial but it not work [closed]

enter code hereSo I new to pytjon and ned heklp so me error is like here: enter code hereexecute:(print)coolaids enter code herefrog=x("") enter code hereprint e enter code hereHeli warld&...
0
votes
2answers
23 views

example C program doesn't work and has weird behavior when useing getchar()

I'm trying to learn c with K&R, but have hit an issue; not all cod seems to be executed? I'm on 1.5.2: character counting; I think this is the exact wording of the example: #include <stdio.h>...
1
vote
0answers
10 views

clang not recognizing unitialized pointer found in static library

I've found a curiosity when compiling with clang (on a MacBook, if it helps). Suppose I have two files: blah.c int *p; main.c #include <stdio.h> extern int *p; int main() { printf("%...
0
votes
0answers
6 views

Unable to find vcvarsall.bat for python 3.10 and windows 10 and c lion

I am creating some extension for python using c language and when I try to install python setup.py install on my venv it does show this error running install running build running build_ext building '...
1
vote
0answers
14 views

How should I handle the fd passed to fdopen or fdopendir if the function fails?

If I have the following: const int fd = open("somedir", O_DIRECTORY); if (fd == -1) { return FAIL; } DIR *const dir = fdopendir(fd); if (!dir) { // close(fd) OR NOT? return FAIL; ...
-2
votes
0answers
14 views

Sending to server from client

I am currently trying to send file to server using my client. Unfortunately, when I read in the file, using fgetc, i am reading ? . Is there something i am doing wrong with the way Im using fgetc ? I ...
0
votes
1answer
41 views

Could you write a printf wrapper that interleaves formatting code and arguments?

I like the succinct format specifiers that printf offers such as %1.3f, as compared to cout, but hate how you have to put all the variables you are going to print at the end of the argument list, ...
0
votes
0answers
13 views

Build problem when installing "triangle" & "glumpy" (on Windows)

I am struggling with installing the package triangle and hence glumpy for Python3.10 on Windows10. I managed to install a bunch of packages without any problem. However, when it comes to triangle I do ...
0
votes
0answers
24 views

Convert array of n strings to symbol *

I need help solving this task if anyone had a similar problem it would help me a lot. The task is: Write a function (not allowed using other functions) that modifies the string s by changing each ...
-2
votes
0answers
15 views

Rewrite function using Neon intrinsics

I would like to use Neon intrinsics to write a function that does exactly the same thing as this one here but I don't know how. can anyone help me? I need to increase the performance of a function ...
0
votes
2answers
48 views

Implicit declaration of function in doubly linked list using C

This isn't the final implementation of the program, but the program itself was a bit long so I decided to create it in small chunks instead. I'm running into an error that says implicit declaration ...
0
votes
1answer
31 views

Array type safety function arguments accessed with compound literal

There is a method which is defined in this manner: void corruption(int (*idata[1]), bool (*flags[3]), bool* (*finfo[2]), int* (*error[1])); I am trying to pass information to it using compound ...
-4
votes
0answers
14 views

Calculate lunar nodes wtih swiss ephemeris [closed]

I am trying to find the way to calculate the lunar nodes with sweetest from Swiss ephemeris astro database. Can anybody explain an example? Thank you!
1
vote
0answers
36 views

Converting a bitmap image into a byte array

Can you please tell me how to convert a bitmap to bytes? Below is the code to copy a bitmap to a buffer, but how do I copy its bytes to later use? For example to reset the picture to disk, or use in ...
0
votes
0answers
14 views

VisualStudioCode error:ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

//haha.c #include <stdio.h> #include "hihi.h" #include "hihi.h" int main() { opop(); return 0; } //hihi.c #include <stdio.h> #include "hihi.h"...

15 30 50 per page
1
2 3 4 5
24861