Questions tagged [c]

C is a general-purpose computer programming language used for operating systems, games and other high performance work and is clearly distinct from C++. Questions about programming in C are off topic and will be closed or migrated. Consider asking your question at Stack Overflow instead.

Filter by
Sorted by
Tagged with
-1
votes
0answers
11 views

C program strings [migrated]

I run the following c program char str[80] = "String"; printf("hello %s\n", str); scanf("%s", str); printf("%s\n", str); scanf("%[ABCDEF]", str); ...
0
votes
1answer
48 views

How to delete a file with 0 bytes, but read “þa” from it in a c program

This question is not the same as How to delete an invincible 0 byte file? since none of the answers have worked and my impossible to delete file I "feeeel" is different. I was following this ...
0
votes
0answers
27 views

How do you stop McAfee from quarantining your .EXE?

I have a history with McAfee quarantining my C code in Microsoft Visual Studio and others have had the same problem. There are solutions, but that requires every .EXE in all your solutions to be ...
0
votes
0answers
21 views

Emulate Visual Studio project structure from Emacs

I need to send a VS C project in its entirety, including .sln and .vsproj etc., for another person to just click and open in VS without any problems. I'd like to use Emacs to work on the project, ...
0
votes
0answers
26 views

How do I stop VSCode from accessing the WSL filesystem

I have WSL2 installed and the it is usually recommended that we don't access these files from Windows. While working on a project that uses the newlib library, I noticed that VSCode is somehow ...
2
votes
1answer
98 views

Net User information VS Get-ADUser

Very generic question regarding different output for Net User, and Get-ADUser. What is really going on "under the hood" when I run each command? I bring this up only due to getting different ...
0
votes
0answers
30 views

Input Queue Tracing with ETW Microsoft-Windows-Win32k

I have UI lags when the machine is busy. When I click on different windows on my UI the selection is not changing which indicates a blocked message queue. After some time 20s or longer the click ...
0
votes
0answers
13 views

Copy file system hierarchy partially from one drive to another and make tar package in simple way

Basically I want to do upgrade the filesystem of the current filesystem present in the linux based microcontroller. But problem is I don't want to upgrade it fully but most of the files . File system ...
1
vote
1answer
49 views

How can I send CR (i.e. ascii 13) to a c program from keyboard (running linux)? ALSO, why do I have to send EOF twice to terminate this program?

I have read that Ctrl-J sends '\n', Ctrl-M sends '\r' and Ctrl-D sends EOF, but either this is incorrect or I'm simply not understanding what's happening. This simple program illustrates: const ...
1
vote
2answers
49 views

Wait for process to start on linux/(net)bsd

I'm attempting to make a script which tracks how many times you execute a specific process. I want to detect when the process starts and then log it. The psuedo-code would be something like this: ...
0
votes
0answers
76 views

Intel compilers fail when math.h is included

I have a very small test C program, in a file called test.c: #include <math.h> int main() { return 0; } If I try to compile this using icc test.c, I get the following errors, that seem to ...
0
votes
0answers
75 views

BadAccess (attempt to access private resource denied) when running Berry

When I run the berry window manager from the CLI I receive the following error. X Error of failed request: BadAccess (attempt to access private resource denied) Major opcode of failed request: 2 (...
0
votes
0answers
15 views

en@shaw Locale not supported by C library

I tried launching GNOME apps with en@shaw locale, an alternative alphabet for English 𐑩𐑯 𐑷𐑤𐑑𐑻𐑯𐑩𐑑𐑦𐑝 𐑨𐑤𐑓𐑩𐑚𐑧𐑑 𐑓 𐑦𐑙𐑜𐑤𐑦𐑖 https://www.shavian.info/ There are localization files on ...
0
votes
0answers
14 views

Visual Studio Code to #STOP formatting comments

I have my Visual Studio Code and I code different C/C++ code, and my comments should remain as is when I format the document. This is not the case, the comments are broken every time a document ...
1
vote
0answers
260 views

libXext.so.6: error adding symbols: DSO missing from command line

i am trying to compile FreeRDP i have this cmake commands cmake -DMONOLITHIC_BUILD=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release \ -DWITH_SSE2=OFF -DWITH_ALSA=OFF -DWITH_FFMPEG=OFF -...
0
votes
0answers
31 views

Is dd command in linux faster than single character reading functions

I need to extract some content of different length at different offset from a file. I would like to know whether to use dd command or simple character reading functions like fgetc
1
vote
0answers
32 views

final link failed ssh

make task_1 gcc -std=c11 -Wall -Werror task_1.c -lsuperkarel -lcurses -o task_1 /usr/bin/ld: final link failed: Disk quota exceeded collect2: error: ld returned 1 exit status make: *** [Makefile:9: ...
1
vote
0answers
12 views

Audio not playing in an application with setreuid() & setgid(), but works with sudo -u command

I have a Arch Linux system with alsa and pulseaudio configured. alsa is set to use pulseaudio default device. Pulseaudio is rumming with tcp module enabled on 127.0.0.1 and anonymous set to true. The ...
1
vote
0answers
36 views

Best way to launch a linux/unix command from C Language

After doing some research i came here, just wanted to know what is the better way to launch a command(for both input/out controlled & not controlled scenarios) in C language. I have looked at the ...
0
votes
1answer
105 views

Far Manager - *.cpp file association

I've been trying to get started with Far Manager, but there are not many good resources out there for setting it up as an ide. Specifically, I'm trying to create a *.cpp file association so I can ...
1
vote
1answer
56 views

Ubuntu v19.10- Tracker is not working

In MAC there is concept of spotlight which is used for indexing. In linux, gnome file manager is used tracker for file searching and tracker is used for file indexing. When I have searched for a file ...
1
vote
0answers
190 views

Which one is correct? Average CPU usage in resource monitor or CPU usage in task manager?

I have a C program which I'm running in windows 10 and I need to know how much CPU it uses. When I run the program, the windows 10 task manager says the program is consuming 25% of the CPU. Although ...
0
votes
0answers
356 views

Why is C/C++ plugin not installing on NetBeans?

My OS is Windows 10. I have installed JDK 14 and NetBeans 12. When I try to install the C/C++ plugin it fails. It shows the following message: Now what can I do to solve the problem?
0
votes
1answer
37 views

How are files data separated in the hard drive?

if i only have a file that contain 1 byte and another file_2 that contain 1 bytes in my hard drive , how are they separated is there a character that separate them like NULL for example like : ...
2
votes
0answers
57 views

Perf top reports symbol “__cpuidle_text_start” consuming 87% CPU time

I have powersave (C-states) disabled in BIOS and in the kernel config, however, CONFIG_CPU_IDLE is enabled, and related "__cpuidle_text_start" takes too much CPU time, while I am not really sure what ...
0
votes
0answers
35 views

How to add feature “don't copy when pressing command” in this c program—macPaste?

https://github.com/lodestone/macpaste https://github.com/lodestone/macpaste/blob/master/macpaste.c with this little project, i can copy a text to cilpboard with just select a text ,in macOS. this ...
0
votes
1answer
4k views

Systemd: “Session closed for user root”

I've written a C application that I would like run at boot. The software operation includes GPIO manipulation and an attached projection cape on the Beaglebone Black that I'm using. I ended up ...
0
votes
1answer
167 views

which partition should be set active in windows 10?

I accidentally made C: as active, but don't know which one was before. Should I set the System Reserved as active? System Reserved - (System, Primary Partition) Win-10 (C:) - (Boot, Page File, ...
0
votes
2answers
246 views

Can we store a whole string with the help of a single character pointer? If yes , How? [closed]

Here p is a character pointer not an array! Yet compiler gave no warning or error? char *p = "Vladimir";
0
votes
1answer
1k views

ALE not working despite passing correct flags to the enabled linters

I'm using VIM to program in C11. I'm trying to setup ALE but it seems that the linters can't find the headers, despite the correct flags are passed, such as -I /path/to/include. I'm using CMake, so ...
0
votes
2answers
13k views

gcc: fatal error: no input files

I wrote this simple line of code and saved it in a file called 'ex.c'. The code is the following (first line is purposely written wrong as it showed up different in the post): "#include < stdio.h &...
1
vote
2answers
8k views

Visual Studio Code doesn't run code

Why VS Code doesn't want to run code when I use scanf() function to get user's input knowing that without this function the code runs perfectly.
13
votes
1answer
4k views

How does the OS tell whether an “Address is already in use”?

If my C program uses sockets, binds to localhost:9025, exchanges some data, gets manually killed and restarted, it sometimes crashes with the error being: Address already in use. All SE-...
0
votes
2answers
2k views

Access Denied when compiling c code with gcc

I compiled my c program with gcc -c -o test.exe test.c and it compiled with no errors and then when I run it gives Access is denied. This is my code #include <stdio.h> int main() { printf("...
0
votes
1answer
1k views

How to troubleshoot C / C++ not producing output in VS code?

I just followed the set up for C / C++ in VS code ( https://code.visualstudio.com/docs/cpp/config-mingw ), I found two strange things: In the "tasks.json" the code has this "command": "g++" which is ...
0
votes
0answers
19 views

Is it possible to pack C develop environment to single file?

Is it able to pack components of least C compile environment (compiler, linker, header file, libc and so on) to single executable file? Also How do I do it? I would like to make a portable C compile ...
-1
votes
1answer
27 views

include statement uses in C/C++ IDE

What determines when a file needs to be copied into a c/c++ project, instead of just using a #include statement? And if the IDE has project options that let the user list directories to include, how ...
0
votes
1answer
300 views

Version: 1.4.5 ./a.out: symbol lookup error: /usr/local/lib/libcjson.so.1: undefined symbol: floor

I've an error related to cJSON. I make and compile Ultralightweight_cJSON in Ubuntu 18. cJSON working fine but just little issue happen. When I use cJSON_AddNumberToObject(fmt, "width", 1920); ...
0
votes
2answers
2k views

How to add graphics.h header file in gcc compiler?

I want to print a pixel on the screen using C language. When I write code and compile it shows graphics.h:No such file or directory I found that gcc doesn't have the "graphics.h" header file. How ...
2
votes
0answers
176 views

GDB suspended every time after run program

I try to debug my program using gdb, but gdb suspended every time after run program. $ > gdb -q ./main Reading symbols from ./main... (gdb) disas main Dump of assembler code for function main: ...
0
votes
1answer
126 views

compiling openssh 5.5p1 with jpake exploit

I am having some trouble using the jpake exploit and compiling it with openssh 5.5p1 :https://github.com/seb-m/jpake/archive/master.zip This is the error I am getting: Screenshot
-1
votes
2answers
104 views

How to send custom messages between routers of same network

I have created a mesh network with 3 routers in which I have to exchange some small i.e less than 5 character message between the routers. All of my routers are running on openwrt so it's a Linux ...
14
votes
3answers
6k views

Compiling C files on Ubuntu and using the executable on Windows

For some odd reason, make kept giving me tabulation errors when compiling on Windows, so I tried it on Ubuntu and it worked just fine. Now I would like to use the executable I got from compiling on ...
1
vote
1answer
156 views

Openssl SSL_CTX_new is successfull but set errno to ENOSYS (Function not implemented)

The SSL_CTX_new() function works fine but something is strange it sets errno to ENOSYS. Documentation doesn't say anything about this : https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_new.html #...
1
vote
1answer
2k views

Why does my GCC compiler not compile C code?

I followed a YouTube tutorial for installing the gcc compiler on my Windows 10 machine. The install appeared to go perfectly. tutorial here. I then wrote a C program, which compiles and executes when ...
0
votes
0answers
82 views

Pointer address value truncated

I am facing core dump issue in my application code, application got dumped in frequent intervals(once in a month, not exactly). During the core analysis , i am able to identify that corrupted pointer ...
0
votes
1answer
861 views

Gentoo / Emerging the latest version of qtwebengine fails

Command: emerge qtwebengine COMMON_FLAGS="-march=native -O2 -pipe" MAKEOPTS="-j3" USE="-bindist" RAM: 4 Gb I have tried removing -pipe, and setting -j1, and also adding -jumbo-build to USE flags, ...
0
votes
1answer
178 views

Why Win16 application layout is behaving strangely under Win10 32bit?

I have an old C Win16 application that is behaving badly when run in Windows 10 32bit. Unfortunately, I do not have the source code for the application so I cannot debug issues from there. The ...
0
votes
0answers
2k views

What is “ DWARF error: could not find abbrev number 67”

I am trying to build library with cmake tool chain but facing with "bin/ld: DWARF error: could not find abbrev number 67" Could someone explain in which consequences this would occur
1
vote
0answers
118 views

My Visual Studio 2017 debug start button showing disabled

How can this be fixed? Program is unusable for me without this feature

1
2 3 4 5 6