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

155
votes
8answers
9k views

What do the parentheses and number after a Unix command or C function mean?

I keep seeing parentheses and a number after a command in Unix or Linux or C function. For example: man(8), ftok(2), mount(8), etc. What do these mean? I see them in man too.
26
votes
3answers
34k views

Syntax highlighting in Microsoft Office Word [duplicate]

Possible Duplicate: How do I easily highlight the syntax of PHP code in Word? I need to paste some code (ANSI C) in Microsoft Office Word, and I need some form of syntax highlighting ...
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. ...
9
votes
4answers
1k views

Does linux have any measures to protect against fork bombs?

#include <unistd.h> int main(int argc, char* argv[]) { while(1) { fork(); } } I run this program on my linux, nothing outputs on the terminal, the OS seems go dead. Does linux have ...
7
votes
1answer
1k views

emacs — C/C++ jump to beginning of containing block

While editing C or C++ files in emacs, I'd like to be able to go to the beginning of the containing block of code. I was expecting to find a c-beginning-of-block function, but alas, no such function ...
6
votes
2answers
6k views

How to copy a DVD with a patched UDF filesystem / bad sectors?

I tried dd, dd_rescue and ddrescue, all failed. Since AnyDVD makes the disc copyable in a second on a Win7 host, it should not be too difficult. It says that the UDF filesystem is patched, curiously, ...
6
votes
2answers
2k views

Go to definition of a C function in a different file in Notepad++

While editing a C project on Notepad++ 5.6.7 (Unicode) with the SourceCookifier plugin, I can press Ctrl+Shift+Enter to go to the definition of a function which the cursor is on, but only if it is in ...
6
votes
6answers
5k views

Is there any small linux distribution which comes with a complete C development environment

I have installed "Damn Small Linux" on my home computer for doing C development in unix. But the distribution doesn't by default come with the C development environment and I am facing some issues ...
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 > ...
5
votes
2answers
7k views

Installing libraries and header files under ubuntu linux for c/c++ developement

I have to admit that I feel completely lost each time I have to fulfill the dependencies of some C or C++ code. Currently, I'm on Ubuntu 9.10, but I remember the same feeling of forlornness from ...
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 ...
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 ...
5
votes
1answer
239 views

How to detect drive letters which are assigned twice?

There is a small bug in Windows that I would like to create a small application as a solution for. So, in my company we have several network drives ( F:\, G:\, H:\, I:\ etc.) and sometimes if I ...
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 ...
4
votes
5answers
316 views

What does this command line do?

export LIBRARY_PATH=.
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.
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, ...
3
votes
2answers
1k views

In GDB, how can I jump directly up to the topmost call stack frame?

I have a C program that seg faults after descending deep into an infinite recursive mess. Backtracing the process in GDB is useless because the call stack frame is at least 1000 frames deep, and the ...
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 ...
3
votes
2answers
853 views

audacity - convert multiple .aup's to .mp3's

I have a bunch of about 130 .aup files (all recordings of vinyls) that I would like to convert to mp3. Each .aup is an entire side of the vinyl (I don't want to split the tracks - the whole side as ...
3
votes
3answers
89 views

NTFS file system reference [closed]

i need to understand full NTFS structure, how partition tables are made and how the directories/files are stored on disk. Who know good reference? Thank you
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 ...
3
votes
1answer
2k views

How to do hardware DTR/DSR flow control on Linux (serial port programming)?

It's possible to setup a serial port communication using hardware flow control with the RTS/CTS pins (CRTSCTS flag for tcsetattr), but there is no way to use the DTR/DSR pins for flow control in a ...
3
votes
1answer
305 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 ...
3
votes
1answer
99 views

What kind of link is this, and how do I deal with them?

I've got an application that has created some sort of filesystem directory link that I've never come across. It appears to behave exactly like a symbolic link to the directory, except that as far as I ...
2
votes
4answers
776 views

What are these hex codes and how can they be decoded/encoded?

I have some interest if finding out a bit more about an exploit that was published that creates a root user in a linux machine; however, before I run the code, I want to make sure I understand all of ...
2
votes
1answer
378 views

In what Ubuntu package are the man pages for the C libraries?

I don't know if this happens to anyone else here, but every time I build a new system, I forget where the man pages for say limits.h are in the Ubuntu repos. I've already installed manpages-dev. I'll ...
2
votes
3answers
1k views

How to run .exe file when linux system starts up?

i have generated .exe file from C file (ie filename.c ) after compiling in linux machine with -O option. I wish to know about how to run that .exe file when linux system starts up ?
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
2answers
347 views

What does this macro mean in linux kernel code?

see i found one config file in which this are macro defined # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y # CONFIG_KEYBOARD_ADP5588 is not set CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_QT2160 ...
2
votes
1answer
708 views

how to mount NTFS partition image on linux from file?

i need to mount at least for read access NTFS-based partition image on linux from a file. File is binary copy of a partition. Is there any libraries or resources for this? Thank you
2
votes
1answer
34 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 ...
2
votes
3answers
579 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
2answers
1k views

How does one change the UUID of a Volume on Mac OS X to a SPECIFIED value?

This is similar to the question asked here: How does one change the UUID of a Volume on Mac OS X 10.6? Only difference is I want to change it to a specific value, not a random one. The hfs.util only ...
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″ ...
2
votes
1answer
316 views

How to spawn a terminal when executing a compiled C program?

I've overwritten the gnome-screenshot program to suit my needs in getting a screenshot from a secondary home-made graphics card output and now when I press the PrintScreen button it executes it (as ...
2
votes
2answers
8k views

“bin/sh: can't access tty; job control turned off” error when running shellcode”

I'm writing shellcode to exploit a buffer overflow vulnerability on a server. To do so I have port binding shellcode that I send to the server and then I run (from a linux terminal) the command telnet ...
2
votes
2answers
245 views

in putty i have a file that is like this #xxx.c#

While using Putty.I have a file in my directory and I want to remove it , but the rm command doesn't work.and it's in white.
2
votes
2answers
4k views

Portable C compiler for Windows on USB stick

I am looking for a portable C compiler to run from an USB stick on Windows (XP or higher). If it's a GCC portable version, that's a plus. If it's also (optionally) a C++ compiler, that's a plus too. ...
2
votes
1answer
4k views

How to install gcc-3.4 on Ubuntu 11.10

I need gcc-3.4 to compile some softwares on my Ubuntu 11.10 (32-bit). So I downloaded: cpp-3.4_3.4.6-6ubuntu5_i386.deb gcc-3.4-base_3.4.6-6ubuntu5_i386.deb gcc-3.4_3.4.6-6ubuntu5_i386.deb and ...
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 ...
2
votes
1answer
5k views

Compile C/C++ on Chrome OS

with the release of the newest Chromebook and Chromebox (where the latter is an interesting choice for a family PC for people who don't need apps like photoshop etc.), I wanted to check out a ...
2
votes
0answers
28 views

C/C++ functions tag for Geany [closed]

I want to generate the C/C++ functions tag for Geany like those that included in the archive, how I can do that. I want to get auto completion when entering a functions name. Thanks in advance for any ...
2
votes
1answer
86 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
219 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
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 ...
2
votes
1answer
223 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 ...
2
votes
1answer
959 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 ...
2
votes
2answers
428 views

What's the most easy-to-install Neural Network C++ library with command-line for Linux? [closed]

I'm a fan of the "test first" approach to programming. My C++ program needs a neural net. I've been trying FANN (http://leenissen.dk/fann/wp/) but it's been a struggle, as it requires a language ...
1
vote
5answers
234 views

Linux file contains “@^@^@^@”, how to restore?

I just finished writing a large c code, but when I save and open again the file contains strange characters: ...