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

2
votes
1answer
167 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
94 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
730 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
170 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
37 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
123 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
70 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
636 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
578 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
186 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
1k 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
2k 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 > ...
2
votes
0answers
593 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 ...
4
votes
3answers
1k 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
48 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?
0
votes
4answers
204 views

Why would a compiled and linked high-level language execute slower than Assembly/machine code? [closed]

Say I compile and link C in to a flat binary or some executable output format to run on a bare machine. If I optimized and fed the direct binary to the CPU upon boot up, why would the resulted format ...
5
votes
2answers
232 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
756 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
511 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 ...
4
votes
2answers
5k 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
108 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
62 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
2k 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. ...
0
votes
0answers
344 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 ...
0
votes
4answers
512 views

How to set the time temporarily in Linux

I am testing some code with some random numbers generated with the current time as the seed using srand(time(0)) I'd like to get the same random numbers every time when I run it. So I want to set ...
0
votes
1answer
290 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: ...
-3
votes
1answer
81 views

USB Driver for Windows [closed]

I want to make a usb driver in c for windows. I have good background in c and c++. Can anybody suggest me how should i start my development?any suggestion?
-4
votes
1answer
85 views

Best assembler -> C book? [closed]

I know there are good assembler books and there are good C/C++ books, but is there a book which maps the two programming languages/levels together?
2
votes
1answer
222 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 ...
0
votes
1answer
233 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 ...
1
vote
2answers
74 views

Making the keyboard eject switch work

I am using Linux.My keyboard switch for ejecting the CDROM does not work though it displays an eject button on the screen. I need to make it work. I know ejecting a cdrom using system call is as ...
2
votes
3answers
195 views

Copy C Drive, will it start up? [duplicate]

Possible Duplicate: Clone a Hard Disk Content to Another Hard Disk Bit-for-bit copy of hard drive in Windows? I was just wondering, if you simply using something like gparted to ...
2
votes
1answer
957 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 ...
0
votes
1answer
190 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
3answers
61 views

Extra file with Same Name Created Automatically while writing a program in unix

Some time while writing a program for example convert.c a file with same name followed by tiled(~) convert.c~ gets created in same directory. why is this so and whats really happening .please explain ...
0
votes
0answers
326 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 ...
0
votes
2answers
50 views

GNU Emacs is crashing with -nw

When I run emacs with -nw option, the emacs really open, but I can't do more nothing. As if the user input is blocked and no keyboard signal is received and/or interpreted. I've tried run without load ...
1
vote
3answers
2k views

How to maximize GNOME Terminal on Linux

Environment: Red Hat Enterprise Linux, C language , Eclipse IDE for C/C++ Developers Question: I'm programming a typing tutor which run on GNOME terminal, i want to maximize terminal when run ...
4
votes
2answers
4k views

How do I install package libc6-dev-i386 on fedora?

When I make yum install libc6-dev-i386 it says no package found, I searched on google and I only found that package for ubuntu or debian.
3
votes
3answers
330 views

syncing large files FreeBSD

I'm having a hard time getting my head around this. My test setup has a shell script continuously calling 'ls -la' on a 1G file and printing out the time since the last time it ran. I then run a ...
1
vote
2answers
1k views

How can I install GCC on Mac OS X Lion without Xcode?

I find it really hard to believe there is not a simple solution to install GCC on Mac without having to download and install more than 1 GB+ of Xcode. I found a site that helps reduce the amount ...
1
vote
1answer
226 views

How to keep Ubuntu 11.10 and Kate editor w/terminal from changing command line when changing tabs?

I am programming C using Kate editor in Ubuntu 11.10. It works great, but when I change tabs in Kate, the terminal line changes to the file path of the tab I click on. Normally this is not a big deal ...
1
vote
1answer
927 views

How can I get the number of threads running in a process from /proc/[pid]/stat in Linux?

I have the pid of the process. I would like to know the current number of thread running in the process. I know I can read /proc/pid/stat for this information, but I'm not sure how to specifically get ...
1
vote
1answer
136 views

View C source files (and files in other programming lanugages) in Icewasel/Firefox

How do I make C files appear in the browser's window when I navigate to them on a web page? (I use Iceweasel which should be identical to Firefox.) I don't want to download the file, not open it in ...
5
votes
1answer
253 views

Kernel hacking methodology - how to find out where to hack the linux kernel

I have a throw-away cheap laptop I'd like to twiddle around, a Thinkpad SL 500. What bothers me are two leds, the one for wireless connectivity, and the one for hibernation, which don't light up at ...
1
vote
1answer
5k views

Installing Cygwin C and C++ compilers for NetBeans IDE 7.2

I am very new to Cygwin, C, C++ and NetBeans IDE 7.2. My PC is running MICROSOFT WINDOWS 7 OS. I have read the documentation on how to install the Cygwin C C++ compilers. ...
1
vote
2answers
2k views

How can I automatically lock the screen when idle in CentOS?

How can I automatically lock the screen when idle in CentOS? I would like it so that a user has to re-enter their password once the machine has been idle for a period of time. If there is no option ...
0
votes
1answer
224 views

C program output file gnome-terminal

I have created a C program and made an executable under Linux. Right now, I open the executable by going first to gnome-terminal and then type ./<filename> I want to create a shortcut icon ...
1
vote
1answer
142 views

How to run C project in Eclipse IDE?

I downloaded Eclipse IDE for from here and I create a sample project from here I followed steps as above link.But in code displays error in "#include" header file.how do I resolve this issue.Please ...
1
vote
1answer
403 views

How to clear orphaned watch descriptors of inotify

After creating a file descriptor by calling inotify_init() I add thousands of watches to the inotify instance(hope it is right to call that so). My questions is if my program crashes what happens to ...