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

0
votes
0answers
25 views

How to read indefinite length multi-word string in c/c++ linux?

I want to know if there is any handy function to read indefinite length multi-word string which would not cause any error or serious warning such as segmentation fault and others in c/c++ linux.
0
votes
0answers
15 views

Link asm bootloader with c file

first of all I'm sorry if I put this post in a wrong category, but I'm new here... Recently I tried to make own, simple "OS". Maybe it's not an appropriate word for that, because my target was just ...
0
votes
0answers
8 views

C code not compile on Eclipse Mac [on hold]

I have taken courses using eclipse writing C++, and it works well. I have Xcode and command line tools, I also have GNU gcc 5.0 When I am switching to C, I create a C project and opened some C source ...
-1
votes
0answers
17 views

Why C 's standard library hasn't directory-releated functions? [on hold]

As the title suggests, why inside the standard library of C there aren't directory-releated functions? Is there a way to handle directories in a portable way?
0
votes
0answers
8 views

Unable to compile GTK+ application

I'm trying to compile a simple GTK app for testing on a Trisquel 7 machine. The packages are derived from Ubuntu 14.04 LTS. I have libgtk2.0-dev installed, but when I try to compile, this is the ...
0
votes
1answer
121 views

How do I set up the NVIDIA nvcc toolchain in Netbeans 8.0 in windows 8.1

I found a plug-in for the nvcc toolchain but it only works on linux. What I want is to be able to compile CUDA C code on my windows computer from within Netbeans. ATM I'm using Netbeans 8 and MS ...
2
votes
1answer
27 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 ...
0
votes
3answers
820 views

GCC won't work. problem with /usr/local/include

I was trying to add a new library/header and seem to have broken gcc. Specifically, I used the command: $ sudo cp mylib.h /usr/local/include This seems to have replaced the /usr/ directory with a ...
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. ...
0
votes
1answer
41 views

How can I know whether a binary file is an executable or a library?

I have a binary file, but how can know the file type, lib or exe. By opening it with notepad++, it shows ELF and a lot of random symbols.
0
votes
1answer
65 views

Windows : How to protect process from getting killed in C/C++ [closed]

Is there any "GODLY" method through which i can protect my process from getting killed either from: 1>Task manager 2>Command prompt -- forcefully kill Things i tried : 1. Hooking Open Process and ...
-3
votes
1answer
36 views

How to create a local server to compile and run programs in C, Java,..etc [closed]

How can I create a local server on my Ubuntu laptop which is able to compile and run C, Java, Ruby, Python, etc code? And I want to use that service from my tablet through WiFi.
2
votes
0answers
16 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 ...
0
votes
0answers
15 views

Idea for triggering after incoming job for cups

i want to trigger an event after my CUPS gets a new printjob. Background: i use a RaspPI as printing service with an usb plugged printer. This printer is always powered on and hasn't any eco mode. ...
0
votes
1answer
28 views

Executing a c operating system inside VMWorkstation [closed]

I am planning on starting development a small, simple operating system, however I am unsure about a starting point.Would running the code inside a VM without a OS in it be the best approach at ...
0
votes
0answers
16 views

Message queue doesn't exists any more after reboot/shutdown of the virtual machine (Ubuntu)

I'm working on a simple multithread client/server program in C using native message queue of unix to send messages from one client to another. It works fine, but my problem is that after a reboot or ...
0
votes
1answer
72 views

What is the difference between copy and paste a file using command line terminal and GUI copy paste?

What is the difference between copy and paste a file using command line terminal and GUI copy paste ? Which one is fast ? I think both are same because of same program will execute in background . ...
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
1answer
22 views

Is there any difference in the view of process & sub process between command “/bin/sh -c ls /” and sh temp.sh(containing one line ls / only)?

What is the difference between the above ways of executing command and the code below? #include int main ( ) { int return_value; return_value = system ( "ls /" ); return return_value; }
0
votes
0answers
7 views

Modbus Communication not Working

https://code.google.com/p/stm32modbus/source/browse/#svn%2Ftrunk%2F%20stm32modbus%20--username%20ickingdom%40gmail.com%253Fstate%253Dclosed I have debug and compile this program successfully but ...
-3
votes
1answer
80 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?
0
votes
0answers
42 views

0711-317 ERROR: Undefined symbol

I am installing a C package named expat-2.1.0 in AIX 6.1 machine. While performing a gmake it popping the below output. /bin/sh ./libtool --silent --mode=compile gcc -std=gnu99 -I./lib -I. -g -O2 ...
0
votes
2answers
81 views

How to execute a compiled C program in Linux terminal

#include<stdio.h> main() { int a,b,c; printf("enter the value of a and b for addition:\n"); scanf("%d %d",&a,&b); c=a+b; printf("Addition of ...
0
votes
1answer
220 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 ...
0
votes
4answers
194 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 ...
1
vote
2answers
83 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 ...
0
votes
2answers
295 views

Issues installing linux drivers from makefile

Since this was more of a software/driver issue I posted the question on SuperUser rather than EE Exchange. I searched around on the net a bit and found a very useful USART to USB converter bridge. ...
0
votes
1answer
34 views

Vim inserting C style comments

:command Linecomment :normal ^i/*<ESC>$a*/<ESC> The above command is one that I came up with in order to comment out an entire line in C, normally for debugging purposes and whatnot. I ...
148
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.
0
votes
1answer
29 views

Gstreamer unable to link API's , Linker error

I was trying to read the PAT table information , Color Balance interface etc using gstreamer in ubuntu . but the the definitions of the API's used by gstreamer to achieve these are not available ...
0
votes
0answers
13 views

How to get stdout of another program [duplicate]

Some Linux program prog1 permanently prints to console. I'd like to read and analyse it's stdout in my C program prog2 as stdin. I can't change prog1 source. I expect something like this command: ...
1
vote
1answer
80 views

Cannot compile C programs after deleting libc.a and libc.so

I removed libc.a and libc.so files from my Raspberry Pi. I read somewhere that it was going to fix a problem i had with the mpi.h library, but instead of that it has prevented me from compiling C ...
0
votes
2answers
522 views

where's the man pages for sizeof function in c lib?

How come there's no man pages for sizeof c function ? $ man 3 sizeof No manual entry for sizeof in section 3 $ man sizeof No manual entry for sizeof I see man pages for other c functions if I do ...
3
votes
1answer
479 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
151 views

Redirect output to console I/O on IAR Embedded Workbench

I have coded a project of mine in C on a Windows machine in the software IAR Embedded Workbench IDE. The project compiles and runs fine. I have a couple of printf functions in my code. But the thing ...
2
votes
1answer
79 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 ...
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, ...
0
votes
1answer
109 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
567 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
143 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
13 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
58 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
114 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
189 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
123 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
107 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
42 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
2answers
405 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
2answers
1k 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 ...
2
votes
1answer
170 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 ...