C is a general-purpose programming language

learn more… | top users | synonyms

5
votes
5answers
316 views

Source code formatter/indenter

I'm using Ubuntu 12.04. I do not have any root or sudo privileges as this is a company machine. Is there, in a normal installation of Ubuntu 12.04, any terminal program that I can use to turn ugly ...
-1
votes
1answer
31 views

To check code execution flow of C program in ubuntu [duplicate]

Is there any software available in UBUNTU 13.10 to check line by line code execution of C programs.
0
votes
0answers
12 views

Open NFC Compilation - g_pNALBinding error while compiling microread/hal_*

for generating the server application using AARDVARK, to access the NFCC, when I am entering make command in this directory: core/porting/linux/client_server/server/microread/hal_cc_client . ...
0
votes
3answers
77 views

How to install Ubuntu on portable external Hard Drive?

OS: Windows 7. I want install Linux Ubuntu on portable external Hard Drive USB 2.0. I read a variety of methods, but I'm confused by contradictory advices and methods. Actually, installing Ubuntu on ...
0
votes
0answers
11 views

Installation failed for API

I'm developing an app for sending OSC messages working through the outlet port 4444 and I am using a C API call Liblo. Project page: http://liblo.sourceforge.net Normal install it by running the ...
1
vote
1answer
42 views

Kindly explain me this code of increment decrement operator [closed]

Following is the code that I run in ubuntu 13.10. Code:- #include<stdio.h> main() { int i=10,j=10; i=i++ + ++j; printf("i=%d j=%d\n",i,j); j=++i + j++; ...
0
votes
0answers
28 views

Capture hrtimer interrupts with linux kernel module .. possible?

I would like to be able to 'capture' an hrtimer interrupt with a linux kernel module and replay the interrupt at a later period in time. Any thoughts on how to go about doing this? Use case: A ...
0
votes
2answers
39 views

How do I get the pcap lib on Ubuntu?

I have a programming assignment where I need to use the pcap lib. #define _BSD_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pcap.h> // <-- ...
0
votes
1answer
34 views

Compiling a C file through Gedit extrernal tools

Is there any way to compile and run .c files by using a shortcut key using gedit? I know its possible for java and C++, and I read somewhere that it is possible to do so using scripts in external ...
0
votes
1answer
41 views

What is kernel modding? [closed]

I want to take a dip in customizing linux kernel. As it's evident that linux kernel can be modified according to our specific needs. My questions are: What is kernel modding? How to perform that? ...
2
votes
3answers
70 views

IDE/Compiler for C or C++ Programming [duplicate]

Is there any software that supports on C or C++ Programming? Then, if it so, how to run, compile or debug your own code to display its output via terminal(linux/ubuntu) or cmd(windows)
0
votes
0answers
20 views

libipq not supported in Ubuntu 12.04 LTS

I have the requirement of altering packets as a part of my University's research project and came across two libraries. which are libnetfilter_queue and libipq which is the deprecated version. ...
0
votes
0answers
16 views

Int system call and 'int' within C syntax

I'm learning about kernels and I was curious if the int system call(in our case, in Linux) has any connection with the declaration of an integer in C and C-based languages. int n; Is an integer ...
1
vote
1answer
54 views

How to let a user execute a script owned by root? Setuid doesn't seem to work anymore

I have some bash scripts that I use with the user 'root' to manage iptable rules. The problem is that I want these things at the same time: The script must be owned by root Permissions must be 700 ...
1
vote
2answers
47 views

Compilation Help on Ubuntu 13.10

I have recently gotten into programming this is a small C code I started on. I am using Ubuntu 13.10. int main(int argc, char *argv[]) { puts("Hello world."); return 0; } Whenever I try ...
0
votes
3answers
147 views

how to compile a c program that uses pthread.h?

I'm a beginner and I'm new to Ubuntu. I just installed it and want to run a C program. I have no idea what platform to use or where to write the code. I need to use pthread.h header file in the ...
0
votes
0answers
46 views

Syntax highlighting not working in Vim?

Can someone help me out. I recently installed Vim for C development and would like to get the syntax highlighting on. I've tried various commands including "syntax on" but none seem to be working. I ...
1
vote
1answer
112 views

Installing a comprehensive LAPACK implementation under Ubuntu

I would like to ask how to properly install a comprehensive LAPACK package as e.g. is offered by the Gentoo package 'sci-libs/clapack' within a Ubuntu environment. I am not talking about atlas here, ...
1
vote
1answer
94 views

make file error, trying to install intel power gadget

I hope another Ubuntu user has tried to run Intel power gadget and knows what problem I am having. I am trying to install the power gadget, running the make file i get an error message: ...
1
vote
0answers
13 views

How to back up a folder in the C root file in XP.. only place the folder can be [closed]

I have a folder directly under C:/ that can only be located there in order to work. I have to back it up daily, I was hoping Ubunto would do that, but it keeps saying the file must be elsewhere (My ...
1
vote
1answer
141 views

Generating core files on Ubuntu

Recently I've been trying to enable core dumps on Ubuntu. I made a simple program, that would crash (it writes some data out of array). At first, core dumps weren't generated. This was because ulimit ...
1
vote
1answer
74 views

Which package to install to use C/C++ compiler with Eclipse

I want to develop C/C++ applications using Eclipse: should I install using sudo apt-get install build-essential or sudo apt-get install gcc
3
votes
1answer
237 views

Where's my /usr/include/sys directory?

I recently upgraded from Kubuntu 12.04 to 13.04, a complete reinstall. Using gcc 4.7.3. I compiled some programs to discover there is no /usr/include/sys directory. That is, types.h, stat.h, etc, ...
0
votes
0answers
120 views

Sending and reading HTTP request through socket for USB connected ethernet device

I'm writing a simple C program to send a HTTP request to a USB modem device, which is loaded(cdc_ether) and has the 192.168.0.144 ip address with ethx interface up on a Ubuntu machine. I am able to ...
-1
votes
1answer
104 views

List containing functions used in C/C++ for Ubuntu's GCC/CC? [closed]

I'm new to programming. What I want is to know as much about programming as I possibly can, and start off with what people say is a good start: programming with C. I have this PDF called "Teach ...
2
votes
1answer
215 views

How to to use gcc with LAPACK and external header file?

I am trying to run a C program that uses an external header file with LAPACK AND LBLAS libraries, every time when i try to run the program i get an error lapack not found, How do i properly use the ...
1
vote
1answer
318 views

Error: ‘strlen’ was not declared in this scope

I am trying to compile several third-party software from source code (i.e. zchaff, argosat) and get errors such as: Error: ‘strlen’ was not declared in this scope Error: ‘strcmp’ was not declared in ...
0
votes
1answer
41 views

Including external Header files in programs [closed]

Being using Windows for most of the time and deciding to start programing in ubuntu,I would like to know how I can include the external header file in my programs.Do I download them manually and paste ...
0
votes
1answer
103 views

Where is my glut?

I try to compile c program : #include<GL/glut.h> #include<GL/glew.h> #include<GL/gl.h> #include<GL/glu.h> void main(int argc, char **argv) { glutInit(&argc, argv); ...
0
votes
0answers
20 views

How can I calculate the traffic on an ethernet port?

I want a C program which runs on any C compiler (like codeblock, eclipse, etc.). Its output should be the traffic on an ethernet port. Does such a program exist?
0
votes
1answer
26 views

Mpi file not recognized?

I am trying to compile some mpi files on Ubuntu I installed the library using this code sudo apt-get install libcr-dev mpich2 mpich2-doc and tried to compile this simple hello world program /* C ...
0
votes
1answer
65 views

My ubuntu can't kill the process which occupy too much memory?

When I tested it, my computer tried it best to provide the most memory to my program.. And my computer crashed.. But I remembered that ubuntu will kill this process if it needs too much memory ...
0
votes
3answers
146 views

How to view the list of c library functions?

I'm a newbie in Linux programming. I found that the way to view the list of system calls in Linux via command-line is: man syscalls But now I want to view the list of c library functions, how can I ...
1
vote
1answer
477 views

How to build GUI application in C language using GTK+?

I have written code in C language using GTK. This code gives a window with 2 buttons, but I do not know how to make the standalone GUI application from this code. Please explain to me step by step ...
0
votes
1answer
22 views

How to know if socket server is working

I am creating a socket server using c, but the client will be an arduino board so i would like to know if there is a way to be testing my code without the client since the arduino is yet to arrive.
1
vote
1answer
997 views

Clang Error “stddef.h file not found”?

After upgrading to Saucy, Clang now gives me the error message: clang -Wall -Werror -std=c99 -ggdb -O0 5.1.c -o 5.1 In file included from 5.1.c:1: /usr/include/stdio.h:33:11: fatal error: 'stddef.h' ...
1
vote
0answers
116 views

How to build and run Concorde and Traveling Salesman Problem? [closed]

I need to use a library that is called Concorde to solve a well known problem called Traveling Salesman Problem. This library is available here I've downloaded and compiled it resulting in two main ...
0
votes
2answers
57 views

Header files in Anjuta [closed]

What is used instead of header in anjuta for a simple C program to give an output? I am new to programming and only used turbo c previously. Thanks in advance.
0
votes
2answers
1k views

how to play audio file using c++ in linux

I am coding this c++ program .I want to play audio clip, format dosen't matter , its just I wrote hello word the most basic program of any language but the thing is instead of showing hello world on ...
0
votes
1answer
118 views

Why does my computer show multiple terminals open Ubuntu 13.10

I am running a c program that records the number of terminals open and then lists them but when I run it I am shown multiple terminal windows open when only the one is, why?
0
votes
0answers
41 views

C compiling issue : fatal error: conio.h: No such file or directory [duplicate]

When I compile a c program it show : gcc gr.c gr.c:1:18: fatal error: conio.h: No such file or directory compilation terminated.
2
votes
0answers
153 views

How to control mouse cursor using c?

As in windows there is a function setCursorPos in windows.h for controlling cursor position. What is the way to do this in ubuntu?
0
votes
1answer
723 views

Why Ubuntu uses eglibc instead of glibc?

I checked for the libc version on my Ubuntu 64bit 12.10 machine by issuing the command ldd --version. I saw that Ubuntu uses eglibc instead of glibc. As egiblc is for embedded machines, Is there a ...
0
votes
1answer
128 views

why do i get fwrite error while saving the data to a binary file?

have written a c program where packets are received from the network and saves it in a binary file called 'sniff_data.bin'. But during the compilation i am getting error as 'too few arguments to ...
1
vote
1answer
185 views

how to open a program generated binary file?

i have implemented a c program where raw packets are received from the network and saved in a binary file. Thing is i cant open that binary file. i tried opening it using terminal,but i am getting ...
0
votes
1answer
612 views

C printf not working on ubuntu 13.10 terminal

I'm new in ubuntu so please bear with me. I need to create a C based program for a course in my university. I was using openSUSE as the OS and konsole as the terminal emulator when I was in the ...
0
votes
0answers
386 views

Blinking cursor when i try to install Ubuntu 13.10 from USB

Today i tried to install Ubuntu 13.10 from USB and when i restart and boot into USB a blinking cursor screen appears. I use the same USB to install windows 8 on my laptop and it works fine. I tried ...
-3
votes
1answer
148 views

Why doesn't my C program print the correct string? [closed]

I am writing a simple C program which reverses a string, taking the string from argv[1]. Here is the code: #include <stdio.h> #include <stdlib.h> #include <string.h> char* ...
0
votes
1answer
66 views

Changes to .o files after compiling

I have built a custom kernel and I am able to do my system call,but now I want to change the logic in the .o file reference in the Makefile obj-y += sys_calls_test.o the sys_calls_test.o has ...
1
vote
1answer
68 views

Code returns nothing

The following program was made according to the book 'Head First C'. It is supposed to be able to find and return music tracks containing a search-word, but it returns nothing. Oh, and I tried to make ...