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

143
votes
8answers
8k 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.
25
votes
3answers
31k 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
1k 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
922 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 ...
6
votes
2answers
5k 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
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
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
894 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
6k 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
1answer
224 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
222 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
5answers
312 views

What does this command line do?

export LIBRARY_PATH=.
4
votes
1answer
4k 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, ...
4
votes
2answers
188 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 ...
3
votes
3answers
704 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 ...
3
votes
1answer
415 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
3k 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
2answers
744 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
76 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
288 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
181 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
96 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
702 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
338 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
177 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
828 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 ...
2
votes
2answers
315 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
631 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
3answers
418 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
152 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
302 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
7k 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
205 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
3k 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
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
90 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
3k 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
1answer
52 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
100 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
141 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
750 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
379 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: ...
1
vote
5answers
37 views

Why does the shell perform pathname expansion for utilities?

This question is a sequel of how does grep work? It seems that the shell does the expansion of *.* to all applicable/available files and provide that to utilities like grep. Why does the shell need ...
1
vote
1answer
120 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
2answers
54 views

Full screen mode not working for tc

I am using a windows 7 os. I am assigned by my instructor to write a C program to draw a circle. I was asked to do it using turbo c. Now, I have installed tc from an old cd of mine. When I open my ...
1
vote
2answers
636 views

How to mix MP3's using LAME

I have N MP3 files (N files for example). I need to superimpose, or mix them into one. Is there a special LAME function for performing such an operation?