C is a general-purpose computer programming language used for operating systems, games and other high performance work and is clearly distinct from C++. It was developed in 1972 by Dennis Ritchie for use with the Unix operating system.

learn more… | top users | synonyms

-4
votes
0answers
26 views

command for copying files in linux to usb drive?

I want to copy files from linux system to the usb flash drive connected to it. I ma using labcar VMware with linux operating szstem in it. could some one tell me how to copy the files from linux ...
0
votes
0answers
7 views

Showing line of text file without using strstr() in C [migrated]

I have a problem with my C program. It's a command line argument of searching character string form the text file and output the line started with the user input character without using strstr(). It's ...
0
votes
0answers
27 views

Linux segmentation fault.(C language) [migrated]

When I run this program. I could find segmentation fault. I don't know how to deal with it. Could u help me? This is my code. #include <stdio.h> #include <string.h> ...
0
votes
0answers
10 views

Running C programs in eclipse runs it twice - windows console and eclipse console

I was finally able to get Eclipse compiling and running C programs correctly. However, I have a strange issue. EDIT: It appears that even if I run the compiled exe outside of Eclipse, it still ...
0
votes
1answer
18 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 ...
1
vote
3answers
49 views

Change network settings programmatically without root

I want to change network configurations like dhcp, ip address and so on programmatically. But what I don't want, is to run my application as root. So my question is: What would be a common approach ...
1
vote
1answer
29 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 ...
0
votes
0answers
12 views

accesing G-listed sectors

is it possible to acces g-listed sectors? in the scsi protocol I can get the amount of g-listed sectors via a a scsi command however I wonder if I can try to read from them. maybe with a direct read ...
0
votes
0answers
24 views

How to get PID of proccess that send SIGRT?

I have a problem with getting sender PID. I write a simple program, but it is not working in function sig_handler in (*info).si_pid. It tells me that there is no such a member. Why? int sethandler( ...
0
votes
1answer
85 views

C compiler in command prompt

It is my understanding that the Windows operating system (windows 7 to be exact) must come with a C compiler because the OS is written in C. How can I access such a compiler to compile my C source ...
1
vote
2answers
94 views

How to invoke shell script while staying in interactive mode

When I call: execl("/bin/sh", "/bin/sh", (void *) NULL); The /bin/sh/ program is started, which opens a shell in which I can type commands. However, if I call: execl("/bin/sh", "/bin/sh", ...
0
votes
0answers
17 views

How to use astyle to format code for linux driver

How can I use astyle to format code for linux driver? I try usingn astyle like this astyle --style=linux myfile.c but it does not fix things like int i,j; there should be a space after ','. ...
0
votes
1answer
31 views

Linux/Bash: Comment every line matching a pattern

sed is foreign to me, to say the least. I'd like to traverse a C project tree and comment out every line calling the function LogMsg(). Something that'd achieve the following: foreach: line within ...
0
votes
1answer
19 views

Virtual Machine Implementation similar to the JVM [closed]

I'd just like some information about how best to implement a virtual machine. I'd just like to know a couple of things: Is a VM more like a Virtual Computer or a Virtual Processor? What are some ...
2
votes
1answer
45 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 ...
0
votes
1answer
57 views

Should I use Python or C for a language interpreter? [closed]

I'm planning on writing a language interpreter for a custom language of mine. The language will work similarly to PHP in that it will be run off of a web server and the code will be executed in the ...
-1
votes
1answer
61 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 ...
0
votes
1answer
39 views

Need advice with making a customized linux distribution (From scratch or pre-existing distro?)

I'm working on an application on a bootable USB drive that runs at startup (doesn't give the user access to anything but this program). I figured I'd utilize an existing distribution, strip it of ...
0
votes
0answers
21 views

Building php module on linux - lpsolve55

I'm trying to install a php model called lpsolve. I installed it on OS, now trying to make a use of it for php. I installed them as explained here: http://jeyroz.tumblr.com/post/605709794/lpsolve-php ...
0
votes
1answer
22 views

To run Makefile.tpl in OSX

I have the file here which syntax seems to be near normal make-file with parameter install. I run unsuccessfully make install I get make: *** No rule to make target `install'. Stop. I get the ...
0
votes
2answers
54 views

Why execute permisiions along with write permissions needed for creating file in c(Linux)?

I am trying to create a file from my c source code on linux. I am using dd command for reading from a file and writing in to a file by creating there. If i don't have execute permissions(I have write ...
0
votes
1answer
245 views

Why i can't run idle in python, while i am connected through putty

here is the the text it shows when I try to run idle: Traceback (most recent call last): File "/opt/epd/bin/idle", line 5, in <module> main() File ...
1
vote
1answer
81 views

How to create an operating system on top of Ubuntu 13.10

I want create an operating system the way Mac did, building a program on top of a Unix operating system. I am planning to make a small operating system with a small amount of functions using C. I do ...
0
votes
1answer
44 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
60 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 ...
3
votes
1answer
117 views

Is it possible to compile with make.inc and Makefile

I am a newbie to the use of make files. I have added a new module in project using make.inc The structure of project is like:- /Project/build.sh /Project/make.inc /Project/Module1/Makefile ...
0
votes
0answers
34 views

Codeblocks with MinGw not storing compiler location

I recently switched back to Windows on my primary computer and installed codeblocks bundled with MinGW. Now every time I launch the IDE I get a message warning me that codeblocks can't find my ...
2
votes
1answer
134 views

How hex command becomes rm -rf ~ / &?

How does the following malicious command become rm -rf ~ / & when compiled? char esp[] __attribute__ ((section(“.text”))) /* e.s.p release */ = “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″ ...
0
votes
1answer
71 views

wake computer up when IP is pinged

i want to wake my computer using WoL or a "VTL"(Virtual Tripline). but, because i am on a router with other devices, i cannot use WoL. Then I looked for a Virtual Tripline on google - no results that ...
1
vote
2answers
301 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
0answers
102 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
34 views

how do you hook into a live stream of 802.15.4 packets? [closed]

Using a packet sniffer I am able to detect and successfully read a "hello word" payload within an 802.15.4 frame. It's great can see the frames in the sniffer, but now I'm at the point where I ...
1
vote
1answer
112 views

Where can I download the .so for OpenSSL

Does anyone know if it is possible to download the latest shared library of OpenSSL from their website? I can only find the source, so maybe they don't make it available. I know I can build this ...
1
vote
1answer
62 views

How to know on which socket is a processor core?

I have a dual socket 8 core system, 4 cores on one socket and the other 4 cores on the other socket. How can I find, which core is on which socket through /proc/cpuinfo. For example here, on which ...
1
vote
1answer
309 views

Valgrind installation errors on OSX 10.8

Hi so I've been trying to Valgrind on mountain lion. I followed the instructions on valgrind's webpage: http://valgrind.org/docs/manual/dist.install.html As well as the instructions on this blog: ...
2
votes
3answers
280 views

Can ffmpeg encode video from frames of different sizes?

I have a toolchain that produces frames that are usually 1920x1080, but occasionally 1919x1080 or 1920x1079. (Yes, this is a bug. Please read on.) When ffmpeg encodes a video from it, with a ...
-2
votes
1answer
110 views

OSX zsh - Why do binaries only execute with the full path? [duplicate]

I'm just writing some small C scripts and testing them. Why dose ~ Desktop: gcc test.c -o test ; /Users/xx/Desktop/test ; work just fine while ~ Desktop: gcc test.c -o test ; test ; dose not ...
0
votes
2answers
664 views

E138: Can't write viminfo file

I'm using ncurses to create a tui to move through directories. I have the program opening editable files in vi using a system call def_prog_mode(); endwin(); sprintf(command, "%s %s", ...
5
votes
3answers
624 views

Why doesn't '>' redirect error messages from gcc?

I stored the following program in new.c int main() { a; return 0; } It returns an error message. I want to send this message to a file. So I used the following command gcc new.c > ...
1
vote
0answers
400 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 ...
3
votes
3answers
435 views

How to quickly navigate/jump between functions on emacs?

How to quickly navigate/jump between functions on emacs? I'm looking for a way to jump quickly to functions on emacs. I'm using the emacs search to do it,but it's too slow and fail. For example,I need ...
1
vote
1answer
44 views

Application server for C programs?

I'm writing some programs in C that will run in a distributed environment. Is there anything like an application server for C that provides clustering, monitoring, logging, etc?
4
votes
2answers
148 views

Wait until SSH succeeds creating a port forwarding

I am calling ssh (OpenSSH) from a OSX/Linux-C++-Application via fork/exec to create a dynamic port forwarding. This is done using batch mode (-o BatchMode=yes) and a private key which is supplied to ...
1
vote
2answers
533 views

when trying to install the watir or watir-webdriver gem on Windows 7 via cygwin, getting long C stack trace with mentions of “W32 socket” issues

When running: $ gem install watir on Windows 7 (cygwin), I get this ERROR: Error installing watir: ERROR: Failed to build gem native extension. /usr/bin/ruby.exe extconf.rb checking for ffi.h... ...
3
votes
1answer
357 views

How to run a Perl script in a Unix environment from Windows?

A little background: I am trying to interact with data I have saved in Perl files using a program I wrote in C using the Win32 API. The C program is in Windows and the Perl files are accessed ...
0
votes
0answers
94 views

load balancing for dual wan interfaces on uclinux

I am trying to write load balancing shell script on my embedded mips board with uclinux. I have one 3G and other ADSL connection to connect to Internet. With $ip a platform shows both interfaces ...
4
votes
1answer
3k views

NetBeans + MinGW + C - file not found

I have installed NetBeans 7.3 (twice this day), and installed MinGW (many times today). My OS Win 7 64 I tried to install MinGW with MSYS, tried MinGW with MSYS and MinGW DT, MinGW without MSYS, ...
2
votes
1answer
61 views

Open multiple tabs and split window based on files in Vim

I'm wondering, is there a way to open all my *.[c] files on different tabs, but split the window with the corresponding *.[h] file from the command line? I can split one file as: vim -O file1.c ...
0
votes
1answer
45 views

Fedora 17 LXDE missing man 2 and man 3 C functions

everyone. I am using Fedora 17, and I need to refer to some C functions, but man 2 malloc or man 3 malloc ( malloc for example ) are not working. Also man (function) is not working too. Any clues? I ...
10
votes
2answers
996 views

How to stop and detect the fork bomb

#include <stdlib.h> #include <unistd.h> int main() { while(1) fork(); } This is the code for a fork bomb. In our college, we connect via telnet i.e client serving protocol. ...