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

0
votes
0answers
35 views

Why won't my if program print the result? [closed]

So, purely out of wanting to teach myself programming, i made this if statement in code::blocks int main() { char answer; printf("Do you like to murder kittens?\n"); scanf("%c", ...
3
votes
0answers
20 views

Run a program and return value libreoffice calc [migrated]

I wrote an algorithm in c that takes input of double precision numbers and returns a double. I would like to use this in libreoffice calc. I tried making a macro function using shell but it only gives ...
0
votes
0answers
28 views

Can somebody explain to me what this simple makefile does [migrated]

I'm new to C and Make and was wondering if someone could help me by explaining what this code does. CC = gcc C_FLAGS = -Wall -Wextra all: eecs338 eecs338: eecs338.o $(CC) eecs338.o -o ...
1
vote
0answers
18 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
20 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 ...
1
vote
1answer
25 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
13 views

openSSL Key and Certificate

As far I know, in an authenticated SSL connection, both the client and server have private keys and provide their certificates (with the corresponding public keys) across the connection before ...
0
votes
0answers
17 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
2answers
31 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, ...
1
vote
0answers
26 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
33 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
16 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
1answer
27 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
24 views

How can I program and debug c code on Fedora? [closed]

I know that in order to compile c on fedora I need to use gcc, but what about debug? How can I debug c on Fedora? What IDE can I use?
0
votes
1answer
43 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 ...
1
vote
2answers
45 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 ...
0
votes
1answer
127 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 ...
1
vote
2answers
70 views

Upgrading gcc for a specific user account

I work on a computing cluster running CentOS6/RHEL6 that I share with ~100 other users, overseen by a single IT admin. Recently, I started writing in C++, and some of my code depends on C++11. ...
0
votes
0answers
21 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
8 views

valgrind impact on code execution?

I am starring at the following issue in OpenJPEG issues list: https://github.com/uclouvain/openjpeg/issues/571 The bug report states that code execution is different when run directly compared to ...
1
vote
1answer
30 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 ...
0
votes
1answer
24 views

A Linux Distribution w/ Version which contains Sendmail version 8.6.9

I'm looking for Sendmail version 8.6.9. What distribution (I don't think that matters) or version of said distribution contains the old 8.6.9 version of sendmail. If I'm going about getting that ...
0
votes
0answers
124 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
1answer
117 views

BASH script that generates a header file with function prototypes

I am doing a C project which involves lots of static linking. To get rid of "implict function declaration" errors I will use a simple solution - a header file with function prototypes. I wrote this ...
0
votes
0answers
74 views

Reset BT adapter through software on linux

I'm trying to reset the Bluetooth adapters using HCI sockets (in C) /* Open HCI socket */ if ((ctl = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI)) < 0) { perror("Can't open HCI socket."); ...
2
votes
1answer
75 views

Does a better/newer C or C++ compiler produce more performant compiled code? Or do they just perform faster/better while compiling?

I am not a C or C++ programmer myself, but I often use software that needs to be compiled or otherwise depends on a compiler, like some R packages. Will that software actually perform better if I use ...
0
votes
0answers
145 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 ...
0
votes
0answers
47 views

how to download and install outdated linux-headers

I just watched the issue concerning how to add additional driver (module) into pre-compiled kernel; I tried to install the linux-headers but in the current repository I could find that all the ...
0
votes
0answers
12 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?
0
votes
0answers
103 views

How to force only Chrome to send network traffic through selected IP interface (not system default) on Windows 7?

I have connected to multiple network interface (like LAN, WiFi, USB modem, VPN) and I want Chrome to use the DNS servers from selected network (BUT NOT SYSTEM DEFAULT means local network) and also ...
1
vote
2answers
104 views

Copying Unix Executable File content from file to file

I am simply experimenting but have found a phenomena that I would be very appreciative if someone could try to explain. I write a simple Hello World program in C. Use gcc to compile this program into ...
1
vote
3answers
300 views

How to keep the terminal open after executing a C program?

I'm trying to run a C program from within a python code. cmd = 'gnome-terminal --command=./myprog' subprocess.Popen(command, stdout=subprocess.PIPE, shell=True) The code executes and the terminal ...
1
vote
0answers
170 views

make a c program run without opening a cmd window [closed]

how can i make a c program run without opening a CMD window, i tried -mwindows flag, used WinMain Entry instead of main, but without results, the cmd still pop up. i tried ShowWindow function by ...
0
votes
1answer
190 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
0answers
41 views

How to measure the latence time of each level of cache memory [closed]

I want to measure the size of each cache memory level (L1, L2, L3) and its latency time. I am using a C program that takes 3 parameters: the size of an arrays that will be read, the number of times to ...
0
votes
0answers
18 views

Can a subprocess launched from a parent executable access the memory of its parent?

Given a system() call with user controlled input, is it possible to read the virtual memory of the parent program? Assume that the system call is made with dropped privileges, and that running ...
-1
votes
2answers
1k views

Program built with MVS2012 “missing MSVCR120D.dll”

I started programming on Visual Studio Express 2012 instead of Code::Blocks, which is way more beautiful, but now I have a HUGE problem: My goal is to release a free OpenSource project with plenty of ...
0
votes
1answer
58 views

How to prevent GNU indent from breaking initialization assignment like “= { 0 };”

See following example. $ indent --version GNU indent 2.2.10 $ cat foo.c void foo() { struct { int a; int b; } v = { 0 }; } $ indent -st foo.c void foo () { struct { ...
-3
votes
1answer
201 views

“cannot open port!” in a DLL project [closed]

I made a C Console Application in Visual Studio in order to access one of the COM ports with the following code and all went well. #include <windows.h> #include <stdio.h> #include ...
0
votes
0answers
145 views

How to send COOKIE, PHPSESSID from my own webserver to php5-cgi script to execute PHP pages

I am developing a Webserver in C. I know how to pass environment variables to ph5-cgi, eg: putenv("QUERY_STRING="); putenv("REQUEST_METHOD=GET"); putenv("REDIRECT_STATUS=true"); ...
0
votes
1answer
128 views

Which GUI framework is used to make Ubuntu?

I'm interested to know, Which GUI framework is used to build ubuntu? As well i know it is built in C/C++. But what GUI is used to make Ubuntu? Help would be appreciated!
1
vote
1answer
58 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 ...
0
votes
1answer
75 views

Linux C Compiler

I've just tried to install APCUPSD and have run into a missing C compiler error. I then ran yum install compat-gcc-34-g77 which went fine but the error did not go away, I tried which gcc as well ...
0
votes
2answers
12k views

username is not in the sudoers file. This incident will be reported

I am running ubuntu 12.04 on my laptop using VMware Player. I am not sure why but I have an account called "User Account" in addition to my account that I usually login to use ubuntu. Well that was ...
0
votes
1answer
203 views

How to delete a particular line in a text file after some operation on that text file at the same time

I am perl bginner (but i guess logic is same for all programming languages like C++ and C in my case its perl). What i want to achieve ? I have a text file i read that file which contains different ...
2
votes
2answers
933 views

How to remove password of PDF with known password? [duplicate]

I have a personal PDF that I would like to remove the password for because the password was my old phone number (which I may forget). How can this be done? Maybe relevant that the PDF contains form ...
2
votes
1answer
494 views

Geany comment block format

I'm trying to figure out where the comment block style is defined in Geany for C files. By this I mean when I select a block of text and hit ctrl-e, each line in the block of text is pre-pended (at ...
1
vote
0answers
31 views

Access remotely two computers via IPv6 [closed]

I have a little problem on my house. Recently, I installed Teredo on two computers using sudo apt-get install miredo. Now I can access my two computer via IPv6 using Sockets in C. My goal is: I am a ...
1
vote
2answers
293 views

Unable to compile GTK+ application

I'm trying to compile a simple GTK app for testing on a Trisquel 7 machine. The packages are derived from Ubuntu 14.04 LTS. I have libgtk2.0-dev installed, but when I try to compile, this is the ...
2
votes
1answer
48 views

Running native applications on the Linux Kernel

When the Linux kernel has loaded it loads the distro or OS to take over, how can I make the kernel load some native application (written in c) instead? I don't need a GUI or anything, Instead I want ...