C is a general-purpose programming language

learn more… | top users | synonyms

0
votes
1answer
33 views

Using mysql in C programming [closed]

I installed ubuntu on a virtual machine.There,I installed mysql server(sudo apt-get install mysql-server) .This worked, because I could acces mysql-u root -p password. After that,I did : sudo apt-get ...
-2
votes
0answers
13 views

How can i implement a new ipc method in c? [closed]

am asked to create a new IPC method thats called Bus. using c on ubuntu. it includes ports. where processes can attach / detach & read / write messages. each bus must have a unique ID. a ...
0
votes
0answers
14 views

Creating SHA-512 password with function crypt

I want to create an encrypted password in a C program with the function crypt with the SHA-2 based hashing algorithms that are supposed to be included in the GNU C Library used by almost all Linux ...
0
votes
0answers
7 views

LTE & other Communication technology using C on Ubuntu [on hold]

Is there any tool to develop LTE and other communication technology(like GSM, GPRS, CDMA and etc) present in Ubuntu ?
0
votes
0answers
10 views

Gnuplot - Save result

I create a graph that changes each second using gnuplot.Now, I want to save this graph as gif or png file when my program finishes. How can I do? My C code is below FILE *pipe = popen("gnuplot ...
2
votes
1answer
44 views

GNU C - Signals never arrive to the handler

I'm working on a university project which needs to be written in GNU C and run on Ubuntu server. My primary OS at home is Ubuntu 14.04 on my PC. The project is about multi thread programming and I ...
0
votes
0answers
13 views

How to Terminate the Child process using ISR from parent process?

I wanted to create a C program to terminate a child process after specific time period (alarm()) using user defined ISR(Interrupt Service Routine) of parent process. How to do it?
0
votes
0answers
15 views

After my Disc partition, when i try to open my C: disc i get this message. Help please! [duplicate]

Error mounting /dev/sda4 at /media/santiago/7E460D8D460D46FD: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda4" ...
1
vote
1answer
37 views

How do I open C libraries and functions implementations?

I am having a problem that I cannot browse the header files /libraries to get the implementation of the C functions like mssget, msgsnd, shmat etc. How should I open these files?
0
votes
0answers
32 views

Header file for struct proc_dir_entry

I'm writing a firewall for the Linux kernel and I'm using the proc_dir_entry data structure (which I've found in the tutorial I'm currently reading). My firewall is conceived as a kernel module but ...
0
votes
1answer
18 views

Not able to include sqlite3 in c program

I installed libsqlite3-dev from ubuntu software center and after the installation, i found the sqlite3.h file in usr/include folder. There was no error in including that header file, but i am not able ...
-3
votes
1answer
76 views

C programming questions (newbie) [closed]

I read Kernighan & Ritchie C programming book now and have a few questions about 'getchar' and 'putchar'. The question is below the code example: #include <stdio.h> int main(void) { ...
0
votes
1answer
31 views

Which compiler i have to use to understand C behaviour exact behaviour

I am confused regarding with the c compilers. as per my knowledge for a programmer the code is not important but the internal behaviour is very important.cause if we know how the compiler behaves for ...
0
votes
0answers
81 views

Unable to create a directory on a mounted file system (FUSE). mkdir: cannot create directory `dirname': File exists

I was trying out the FUSE file system. I downloaded fuse 2.9.3 and installed it to a directory in my Home directory. I did rest of the work as superuser (as I was denied to manipulate the mounted ...
0
votes
2answers
105 views

No such file or directory #include <string> [closed]

I wrote the program kai.c and now am trying to compile it with gcc kai.c -o kai, which returns: kai.c:5:18: fatal error: string: No such file or directory #include <string> ^ ...
0
votes
1answer
34 views

Sending different kill signals to init - how to log

I have to write a C program to check how init reacts to different kill signals, however I am not sure how to log it - for example signal number 14 crashes the ubuntu, then some higher one turns it ...
0
votes
1answer
53 views

FT_Read is not working properly [closed]

I am writing code for serial programming for serial communication between FTDI device and Desktop through XBEE. I am writing command on device for (in example) reading Battery Voltage Current and ...
-1
votes
1answer
61 views

json_object_iterator.h not Found

I am trying to parse JSON object from C program. but i got following error. my c program contains json/json.h header file. this header file is causing below error. May I need to install anything. I ...
0
votes
2answers
126 views

Installing C POSIX libraies in ubuntu 14.04 LTS

I'm trying to install the following C POSIX libraries in ubuntu 14.04 but for some reason some of them won't intall. The libraries; sys/ioctl.h unistd.h locale.h ncursesw/ncurses.h Comands sudo ...
1
vote
0answers
27 views

Permission denied when running C programs outside the Home directory [duplicate]

I have been creating some C programs and I have saved them to my Home directory while editing. I have compiled them with gcc and then run the executable file with ./ and they work fine. However, when ...
0
votes
1answer
30 views

How to compile with X11 library?

I'm trying to compile this code here: http://lists.kde.org/?l=kwin&m=115435217715650&w=2 I compile it with this line of code: gcc -lX11 -lstdc++ -L/usr/X11/lib -o icon icon.c but it keeps ...
0
votes
1answer
56 views

How to use the c/c++ code to change ubuntu's background

Or any other way.I want to make an application to make my desktop pretty.
0
votes
0answers
225 views

How to install C++ libraries in Ubuntu 14.04

I've been searching for a couple of hours but I haven't found anything yet. I want to know which is the preferred method for installing C/C++ libraries in Ubuntu 14.04. Is there a CLI command or ...
0
votes
0answers
21 views

No SDLIMAGE found while running ./configure file

recently i installed libsdl1.2-dev to install a game, after installing it in system. I run ./configure file and I am getting new error checking for sdl-config... /usr/bin/sdl-config checking for SDL ...
0
votes
1answer
18 views

get pdiffer working in ubuntu

I am trying to use pdiffer in ubuntu. It is a python interface to the PerceptualDiff tool. https://pypi.python.org/pypi/pdiffer I installed pdiffer using pip (after installing pip) I installed cmake ...
0
votes
2answers
33 views

wallpapers for ubuntu, paint app [closed]

I want to have new wallpapers for ubuntu desktop. How to get them, where? Also what is paintbrush app named in ubuntu. In windows it is mspaint. Is C compiler available from software centre?
0
votes
0answers
78 views

C/C++ Query EDID at boot time

I'm looking for a way to query EDID data at boot time on my Android system. I think I can use ioctl calls and I see that the frame buffers are at /sys/class/graphics/fb*. But currently I'm just ...
1
vote
1answer
379 views

Why can't I use conio.h or ncurses.h?

I am new user to Ubuntu. I wrote a simple program in C. When I try to compile it to use conio.h, the compiler gives me fatal error. So I tried by ncurses.h, but still I am getting same error.
0
votes
2answers
137 views

gcc compiler in ubuntu

I created a simple C program which prints "Hello world" as output and saved it as test.c. Compiled it in terminal as gcc -o test test.c & run it as ./test but the there is no output showing. If ...
1
vote
1answer
144 views

What C is PS using to Determine Process Info Programmatically

In both linux and macos we can get PID info, start time by using bash: ps -p PID_HERE -o lstart=. I was going to use lstat and plan on it. But just out of curiosity: Programatically ps has to be ...
0
votes
0answers
5 views

More window objects than are open?

Using c and x11: XQueryTree XGetWindowProperty XInternetAtom of _NET_WM_USER_TIME Full code is in Javascript version of CTypes here: GitHubGIST :: Noitidart / ...
1
vote
1answer
27 views

Stat a PID for claim time?

Is it possible to stat a process ID to get the time it was claimed?
1
vote
2answers
111 views

Are fcntl constants in Ubuntu different from other OS?

I found the problem with my fcntl implementation in js-ctypes. I was using the wrong constant values. Everywerhe I look though they have it different, For example: ...
0
votes
1answer
222 views

font configuration warning [duplicate]

when I was doing c program in Ubuntu 12.04 , there is a font configuration warning shown by terminal. What should I do? shayna@shayna-Vostro-3446:~$ gedit hello6.c Fontconfig warning: ...
0
votes
1answer
52 views

GCC Compiled program not running in a new Window

What i am Doing? I have created a simple c Program that runs and executes a system Command the code is as follows #include <stdio.h> #include <stdlib.h> #include <string.h> ...
1
vote
0answers
63 views

Why does sudo prevent catching SIGTSTP (Ctrl+Z)?

This program is written to catch SIGTSTP (Ctrl+Z) and bypass its normal effect, printing a message and returning to its normal operation instead of allowing its process to be suspended: ...
0
votes
1answer
96 views

Setting up lubuntu to access /usr/src/linux-headers-3.1.x.xx?

I need to access a block of memory assigned by a FPGA to a PLX chip. Now I dont think that will be to much of a problem accept when I try and use the /include/linux headers they seem to be somewhat ...
1
vote
2answers
204 views

.desktop file doesn't execute a script, works fine when run by hand

I am having problems with my .desktop files. I have a shell script that constantly watches for a file to be put into the "Downloads" folder. When a file is put into the folder it automatically ...
0
votes
0answers
47 views

Extracting a statically linked library

Is it possible to extract a statically linked library from an executable (e.g. turn it into an .so file), when I have the .h header file declaring the symbols? I also already have the .so file, but ...
0
votes
1answer
30 views

What are the files needs to be edit to add a user? and what to be write?

I am trying to write a C program to add a new user to my Ubuntu 14.04. I edited 1) /etc/passwd sachin:x:65535:1:sachin:/home/sachin:/bin/bash 2) /etc/shadow ...
0
votes
1answer
44 views

how do i run main file which function is store in another file and also the header file too?

// mainheader.h int square(int b); // maiNfunction.c #include"mainheader.h" #include<stdio.h> int square(int b) { int y; y= b*b; return (y); } //=====maiN.c file ...
0
votes
0answers
56 views

How to install and use (link) librsync library

I installed the librsync library using: sudo apt-get install librsync-dev librsync-dbg. But then how do I link this library statically? I Tried: gcc -o my_prog my_prog.c pkg-config --libs ...
0
votes
1answer
42 views

how to implement the functions which are defined inside the conio.h

I wanted to use the conio.h header file in one of my C codes but as we know the header file is not available for unbuntu, what should we do if we want to implement the functions if the header file ...
0
votes
1answer
502 views

Should `arm-none-eabi-gcc` include a `stdio.h`?

I'm trying to build a simple example from the SDK for the TI CC3200 (Cortex M4), but when I try to compile it complains about stdio.h. make CC ../main.c ../main.c:45:19: fatal error: stdio.h: No ...
0
votes
2answers
98 views

Newbie C programming question [closed]

Can anyone explain why the output of this code is 2? I mistakenly thought it was 3. int array[] = {1, 2, 3}; int *address = array; array[0] = 2; array[1] = array[2]; array[2] = *address; ...
0
votes
0answers
39 views

Ubuntu 14.04 freezed when too much memory in malloced

I am trying to run a C program which mallocs the memory as per the input given by user. Whenever I input something as big as 1000000000 rather than returning NULL value, my Ubuntu 14.04 machine ...
0
votes
1answer
170 views

Compiling C code for ARM processor on Ubuntu 12.04

I am compiling my simple "Hello world" C code using the following command: arm-linux-gnueabi-gcc-4.4 test.cpp -o test It generates an error: arm-linux-gnueabi-gcc-4.4: error trying to exec ...
1
vote
1answer
143 views

Getting time in ubuntu [closed]

#include <sys/time.h> #include <stdio.h> int GetTime() { struct timespec tsp; clock_gettime(CLOCK_REALTIME, &tsp); //Call clock_gettime to fill tsp fprintf(stdout, ...
0
votes
1answer
81 views

ALSA prgramming in C

I'm using a C program that help me recording from my audio device here is the code : /* Use the newer ALSA API */ #define ALSA_PCM_NEW_HW_PARAMS_API #include <alsa/asoundlib.h> int main() { ...
-1
votes
1answer
69 views

unfamiliar codes in iw [closed]

Recently I am trying to understand how the codes in iw works. In iw.h, I encountered the following: #define __COMMAND(sect, name, args, nlcmd, flags, idby, handler) \ static const struct cmd ...