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

-4
votes
1answer
91 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
381 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
277 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
83 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
1answer
1k 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
233 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
62 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
376 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
55 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
6k 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
405 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
2k 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
259 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
1k 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
172 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
278 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 ...
2
votes
1answer
6k 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
3answers
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
239 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
145 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
579 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 ...
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 ...
2
votes
1answer
8k 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 ...
1
vote
5answers
235 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: ...
2
votes
1answer
330 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 ...
3
votes
2answers
11k 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 ...
1
vote
5answers
1k views

How do sockets deal with routers?

(Not sure if this should be on the unix stackexchange site...) When I make a socket I use IPv4 and a port number. So if I know both of these, but there's a router set up (on a home network; just ...
7
votes
2answers
7k 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, ...
2
votes
2answers
288 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.
3
votes
2answers
946 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 ...
2
votes
2answers
388 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
2k views

unable to compile a kernel module

I tried to compile my first loadable kernel module and failed :( Here is the error: r@ubuntu:/$ sudo make -C /lib/modules/`uname -r`/build/ M=`pwd` [sudo] password for r: make: Entering directory ...
0
votes
1answer
296 views

Does Windows 7 XP mode support the Turbo C compiler? [closed]

Does XP mode in Windows 7 support the Turbo C compiler?
0
votes
1answer
129 views

Setup Eclipse on Fedora LiveUSB for Developing C Application

I don't have a lot of disk space on my computer, so I'm thinking of installing a version of Fedora on LiveUSB with an Eclipse package to program and debug C applications for one of my lectures, no ...
2
votes
2answers
5k 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 ...
0
votes
1answer
325 views

Mingw Shell Console Issue

I recently installed MingW/Msys on my XP Pro box (SP 3). When I attempt to open a Mingw shell as a console it behaves incorrectly. The shell window opens for perhaps 5 seconds and then the window ...
0
votes
2answers
877 views

Make Tor use Unique IP for each instance open

How can I get Tor to use a unique IP for each instance of Tor open in C++, Python or Perl? Is there a command to force it to use a unique IP that I can just call using subprocess? *cheers
1
vote
1answer
494 views

How do you add RefocusIt to Gimp?

I'm trying to compile Gimp with a special plugin called Refocus-It. I know that I need to compile something. Can somebody please explain what needs to be done? I would like to accomplish this using ...
1
vote
1answer
605 views

Does stat/lstat on nonexistent file cause a disk seek?

When searching for a library file from a right folder, my application currently does couple of lstat's for the possible locationslocations. Now I'm wondering whether these lstat's (application is ...
3
votes
1answer
3k 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
2answers
2k 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 ...
5
votes
1answer
257 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 ...
1
vote
5answers
39 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 ...
0
votes
3answers
59 views

Using Connection of one PC on another [closed]

I have two linux PC and connected through LAN cable.First PC having internet connection but second does not.I want second PC to use the connection of first PC through a C program. I am new to network ...
3
votes
1answer
103 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 ...
1
vote
1answer
4k views

How to enable daytime service on ubuntu

I have found the following info on my machine user@ubuntu:/etc/xinetd.d$ cat daytime # default: off # description: An internal xinetd service which gets the current system time # then prints it out ...
4
votes
2answers
2k 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
4answers
879 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 ...