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.

learn more… | top users | synonyms

1
vote
2answers
49 views

What is the difference between working on a machine and doing the same task over ssh?

I have been working at University on a local machine which is on a server that I have access to. I have some c code and am able to carry out parallel runs of the code as expected. However when I ...
1
vote
2answers
1k views

Building GCC and Binutils on Windows 7 x64

I am trying to build GCC following the instructions in: Building GCC. At the moment I am building binutils but getting the error: * BFD does not support target x86_64-unknown-cygwin. Look in ...
0
votes
2answers
49 views

Can I sandbox a binary created in C (with GCC) for Linux and make it easy for users?

I have compiled a binary that I want to distribute to other people. It's closed-source, but I want to provide users of the binary with confidence that it cannot possibly access the internet, ...
2
votes
1answer
128 views

Record a process's User/System/Real time in Linux/Bash with greater precision

What I am looking for is something along the lines of /usr/bin/time, however, this usually does not have enough precision. I am running a C program (that I can edit and recompile) and I need to ...
2
votes
1answer
456 views

Get Physical NIC's Mac Addresses on Linux

I am trying to get the mac addresses of a Linux machine. I only want the physical NIC's though, not the virtual ones. I have been doing some searching and maybe I am not punching in the right terms ...
2
votes
1answer
659 views

Environment variable's address is changing?

Don't ask why I am not posting this at Stack. So I have this small C program. It returns the address of the environment variable specified in argv[1]. #include <stdio.h> #include <stdlib.h&...
2
votes
1answer
1k views

execvp exec format error for shell script on Red Hat Enterprise Linux 6

We have two RHEL 6 systems that are running identical versions of the kernel and glibc (glibc–2.12–1.90.el6_3.6). According to the POSIX standard and the Linux man pages, if the kernel determines that ...
1
vote
1answer
76 views

The “other” finger (GECOS fields at /etc/passwd)

in the file /etc/passwd we have the so called GECOS fields (which stands for "General Electric Comprehensive Operating System"), that is: username:password:userid:groupid:gecos:home-dir:shell ...
1
vote
1answer
32 views

Setting up quarantine environment on Linux or Mac

How can I setup an quarantine environment so that I can test my codes or programs which can fork any number of times? I was trying this on Mac and if I have a fork in a while loop which is not ...
1
vote
1answer
67 views

How do I install programming info pages in Mac OS X?

I used to have a Linux system i was able to type info libc to view info pages on the C library, including unix functions. However, now I am running Mac OS X this does not work. How do I install the ...
1
vote
1answer
438 views

How to install gcc 4.4.7 on Mountain Lion

I need to install a specific version of the GNU GCC compiler, gcc 4.4.7, on my macbook, but I'm not sure how to do this. Most places I've found install later versions but I need to install that ...
1
vote
1answer
789 views

Does stat/lstat on nonexistent file cause a disk seek?

When searching for a library file from a right folder, my application currently does couple of lstat's for the possible locationslocations. Now I'm wondering whether these lstat's (application is ...
0
votes
1answer
21 views

libcurl version 7.21 to work on Redhat 6

I am having an issue with libcurl version 7.19 and socks proxy on redhat 6. I believe it was fixed in libcurl version 7.21 how do i upgrade libcurl on redhat 6 to 7.21 or greater?
0
votes
1answer
49 views

How can I add a flag in PostgreSQL source code that works in both frontend and backend?

I'm trying to do some changes to postgresql source code. I want to add a flag that works in both frontend and backend. Here is what I have done so far. 1- I created my header file mine.h in which I ...
0
votes
1answer
76 views

C programs stuck

After installing windows 10 a couple of month ago i tryed to run a very simple C program, firtsly in Visual Studio 2015, and the entire IDE froze. Then I tried compiling via command line. The build is ...
0
votes
1answer
190 views

DD-WRT calling web service from Arduino ESP8266

I am looking for a way of finding out what devices are currently attached wirelessly to the router thats running DD-WRT firmware. Problem is that I am unable to find any references to a REST API or ...
0
votes
1answer
245 views

How to change the default terminal beep frequency of the PC speaker?

I want to change the default sound frequency ofSND_BELL(which is used when\aor BEL or ^G is printed on the screen) to higher values (the current default is around 750Hz). Of course this turn to need a ...
0
votes
1answer
38 views

Is there any difference in the view of process & sub process between command “/bin/sh -c ls /” and sh temp.sh(containing one line ls / only)?

What is the difference between the above ways of executing command and the code below? #include int main ( ) { int return_value; return_value = system ( "ls /" ); return return_value; }
0
votes
1answer
123 views

Gstreamer unable to link API's , Linker error

I was trying to read the PAT table information , Color Balance interface etc using gstreamer in ubuntu . but the the definitions of the API's used by gstreamer to achieve these are not available ....
0
votes
1answer
1k views

How do I set up the NVIDIA nvcc toolchain in Netbeans 8.0 in windows 8.1

I found a plug-in for the nvcc toolchain but it only works on linux. What I want is to be able to compile CUDA C code on my windows computer from within Netbeans. ATM I'm using Netbeans 8 and MS ...
0
votes
1answer
397 views

stuck on i2cmaster library

i want to try repair my batteries with smbus hacker code over arduino. first it was has some problems. i have tried to fix them and i fix. now i have problem on library i2c\test_i2cmaster.c.o: In ...
0
votes
1answer
80 views

running program in high priority -> does not log anymore

I have a project in visual C 2010 that needs real-time timing in high priority to eliminate stuff like hard disk maintenance and stuff. I ran the .exe file of my project using start "" /high & ...
0
votes
1answer
183 views

Cant compile SDL source file with gcc

i downloaded a manual of introduction to graphics programming with SDL, so i tried to compile my first source and it logged the next error the command to compile it was: $ gcc helloWorld.c [-o ...
0
votes
1answer
439 views

Which Package has net_tstamp.h?

I attempted to compile the source code here: http://os1a.cs.columbia.edu/lxr/source/Documentation/networking/timestamping/timestamping.c?a=x86;v=2.6.32 However, I got a compiler error: error: linux/...
0
votes
1answer
342 views

OSX: Remaining in terminal after C program executes

2nd edit Some clarifying... I wrote a C program that asks for input (in this case, using fgets()). When I compile it into a C executable, I notice this behavior: If I run the executable from the ...
0
votes
1answer
302 views

Makefile support for Tiny C Compiler

I just found the brilliant Tiny C Compiler while searching for a small portable C compiler for Windows (I cannot install anything on this system or copy files to it and so need to compile directly on ...
0
votes
1answer
1k views

How do I find the installation path of binutils, gcc-3.4.4.tar.gz in Ubuntu?

I have ubuntu 8.10. In this I could find the binutils, gcc are installed. But when ever I try to know that glibc, glibc-linuxthreads are installed are not. It showing that no package is found. For ...
-1
votes
1answer
402 views

C/C++ programs hang in Windows 7 console

I've installed Windows 7 Home Premium. It's working fine, except one major problem. When I run any C or C++ program in the console, using any software like Dev-C++, Code::Blocks or Visual Studio, it ...
2
votes
0answers
56 views

how is envp argument passed to execve system call?

Suppose I call int execve(const char *filename, char *const argv[], char *const envp[]) where I malloced memory for envp, then how does the program filename access the contents of that array when ...
2
votes
0answers
793 views

How to add “Read & execute” permission in Windows 7 for file on Samba drive

From a C program I would like to add "Read & execute" permission in Windows 7 for a file on a Samba drive. The "icacls" program is used in example below, but a C library call could also be a ...
1
vote
0answers
23 views

How can I recover my c drive after downloading SQL Server 2014 Express with Tools?

I downloaded SQL Server 2014 Express with Tools went through the entire process but the install file file kept running as if in a loop. I uninstalled the programs and affiliated drivers and now I keep ...
1
vote
0answers
15 views

How can I know if SNMP Walk or a Table-View is started?

Hello how can I know if a User has "sent" a SNMP-Walk or a TABLE-VIEW request to a device with UCD-SNMP/NET-SNMP and custom coding?
1
vote
0answers
393 views

So I stupidly install newlib, and probably overwrote references to glibc. How can I recover glibc?

I forgot to set a make --prefix and I think it wrote to /usr/local/ by default and now I'm having all kinds of errors. I'm on ubuntu natty, what's the easiest way to resurrect glibc. I've tried to ...
0
votes
0answers
11 views

Start Mplayer without extra cmd window (on windows)

I know in Linux it's just (nohup mplayer video.flv >/dev/null &) && exit i want to do the same in windows , start the mplayer from cmd without the extra cmd window ,how can i do it ?...
0
votes
0answers
25 views

Where can I get Unicast, Multicast, Broadcast and Discard Packets Sent and Received via a particular interface in Unix systems?

I have created several interfaces on my Unix machine for communication to the external world. Now I need to get the count of various packets Sent and Received via each interface. I have already ...
0
votes
0answers
68 views

Clion formatting code differently (comments aligned in a column)

Question is about Clion. I don't have enough reputation to put the tag in the question's tags. I have 2 things I need, in order to format code in a different way in Clion, and I can't figure out how ...
0
votes
0answers
46 views

prevent asl message to show up on /var/log/system.log

I'd like to define new asl facility in my project, and use it to generate asl log messages that wouldn't show up in /var/log/system.log (but only in the my pre-defined log file) here's my entire asl ...
0
votes
0answers
29 views

pnmtopng on large file

I am running pnmtopng on a 101M, 3000x4000 pixel PNM file. I get the error pnmtopng: ASCII decimal integer in file is too large to be processed. every time I run it. I looked through the source and it ...
0
votes
0answers
36 views

Why do these benchmarks NOT saturate the CPU.

I ran two trivial benchmarks in Powershell and C. I ran this on reasonably well endowed i7-2600 with 16 Gig Win 7 Pro. Both ran using two of the 8 cores (really 4 cores dual hyper threaded) and ran ...
0
votes
0answers
36 views

Building software on Arch and finding the dependency

I'm relatively new to compiling software. I downloaded a package called gr-scan which uses gnuradio and osmosdr (I have both installed and working via pacman already). The instructions say to edit the ...
0
votes
0answers
31 views

Slow IPC in 4000+ processes

I have an multiprocess application that is dependent on IPC calls. We have around 4000+ processes running. Currently we upgraded the system to RHEL 6.4, and now are observing that IPC calls msgrcv() ...
0
votes
0answers
177 views

build numpy from source results in wrong architecture

I build numpy from source on my mac to link it to my ATLAS library. Thus, I wanted to run it as described here with these options: export MACOSX_DEPLOYMENT_TARGET=10.10 export CFLAGS="-arch i386 -...
0
votes
0answers
202 views

How can I use older gcc headers?

I installed gcc-3.4 to Debian 7.8 and create symbolic link /usr/bin/gcc. When I typed gcc --version I get: gcc (GCC) 3.4.6 (Debian 3.4.6.-9) Then I wrote simple C program. #include <stdio.h>...
0
votes
0answers
330 views

Ctrl-D does not do what it's supposed to in Cygwin on Win7, according to C tutorials

I'm following examples in the book Head First C, and I'm supposed to enter strings at the command line for the program to encrypt, then ctrl-D when I'm done. But ctrl-D doesn't have any effect.
0
votes
0answers
491 views

apache httpd libapr linking .a .so

Problem I need to compile and install an Apache module on AIX 6.1. This is the module A. The Apache module is available only as source. I manageg to compile the source and the .so module was created,...
0
votes
0answers
478 views

What would cause different rates of packet loss between client and server in UDP?

If I've implemented a reliable UDP file transfer protocol and I have a file that deliberately drops a percentage of packets when I transmit, why would it be more evident that transmission time ...
-1
votes
0answers
29 views

Concerns about the order of the bytes in the stack

I'm experimenting with format strings vulnerabilities. In particular, I have a vulnerable C program like the following one: void test(char *arg) { char buf[256]; snprintf(buf, 250, arg); ...
-2
votes
0answers
9 views

Want to analyse the DHCP client code

I want to implement the DHCP client as a part of my project in C. But for this i want to understand the code. Is there any source which gives the descriptions of all functions and headers that will be ...