C is a general-purpose programming language

learn more… | top users | synonyms

0
votes
0answers
16 views

can anyone help to find summation of float number? [on hold]

#include<stdio.h> #include<stdlib.h> #include<math.h> float summation(float g); int main(int argc,int *argv[]) { srand(12345); float z; float a=0.2,y=0.0; int i; ...
0
votes
0answers
9 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
26 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
24 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
40 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
29 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
25 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
40 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
26 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
32 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 ...
0
votes
0answers
116 views

Cmake fails while configuring OpenCV

I'm trying to buid OpenCV and use it in Qt. I have installed all required packages for OpenCV and Qt, after that I tried too run cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ...
2
votes
2answers
138 views

ls system command not showing terminal colors

I've just been fooling around with some code in C, an example of a really basic program is as follows which just, obviously, lists the directories using the ls system command. #include ...
2
votes
0answers
82 views

gstreamer pulseaudio echo cancellation

I'm implementing a voip application using gstreamer, i use the example of the rtp in the plugin-good! i want to implement echo cancellation, i couldn't use the speex echo canceller with gstreamer ...
1
vote
0answers
10 views

Library for Audio files

I have written a project in Matlab, using some signal processing (fft,convolution,PSD etc), and I have to put it on ubuntu , for that I need to write a project in C, and I was wondering if there ...
0
votes
0answers
19 views

How to access terminals with their names through C program?

How to access a terminal through its name in C program? I can only access the current terminal in which I am running the program through system() function. I want to access multiple terminals ...
0
votes
1answer
87 views

Error running C program compiled with Geany IDE Error Code: 127

I installed Geany IDE via Ubuntu Software Center. Wrote a hello world prog in C and it compiled successfully but when i tried to run it, it gave me this error: ./geany_run_script.sh: 5: ...
0
votes
0answers
37 views

Speed up executable program Linux. Bit Toggling [closed]

I have a ZyBo circuit board which has a ArmV7 processor. I wrote a C program to output a clock and a corresponding data sequence on a PMOD. The PMOD has a switching speed of up to 50MHz. However, my ...
0
votes
2answers
378 views

Are there drivers for OpenGL 4.3 for [AMD/ATI] Seymour [Radeon HD 6400M/7400M Series] (Ubuntu 14.04)

I want to be able to do opengl4.3 c/c++ programming, the [AMD/ATI] Seymour [Radeon HD 6400M/7400M Series] should be able to support it, I just don't know what drivers I have to install Also I have ...
3
votes
1answer
2k views

fatal error: sys/cdefs.h: No such file or directory|

It has been weeks that i am trying to use Code::Blocks IDE to program Atmega16, however, i am hindered by the following error while compiling/building the program in C::B ...
0
votes
1answer
91 views

How to enable c99 and c11 on gcc?

When I compile the following code it gives compilation error that error: ‘for’ loop initial declarations are only allowed in C99 mode for(int i = 0; i < 5; i++) and to compile your code use ...
1
vote
0answers
30 views

'__FDELT' and '__FDMASK' not declared in this scope (posix_types.h not included)

I'm running Ubuntu 12.04 LTS, 64bit version. I'm getting the following error when compiling a C++ program: ../elements/userlevel/socket.cc:477: error: '__FDELT' was not declared in this scope ...
1
vote
0answers
31 views

Calculating postfix expressions using stack [closed]

What is wrong with my calculate function? All other functions work fine but when I try to calculate a post fix expression, it adds some weird symbols to my stack. void push (char operand){ ++top; ...
0
votes
1answer
13 views

Upgrade restart fail

Upgrading from v13.04 to 13.10, all went well until "restart to complete"--screen did not come up for restart (Nvidia GeforceGTX650). I tried various suggestions, but now cannot get even Grub menu on ...
7
votes
6answers
361 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
57 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
25 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
212 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
13 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
74 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
48 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
103 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
93 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
50 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
135 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
67 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
18 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
110 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
51 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
1k 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
148 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 ...
2
votes
1answer
616 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
153 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
14 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
302 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
118 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
1k 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
269 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
187 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
635 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
899 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 ...