15,551 Topics

Member Avatar for
Member Avatar for wonder_laptop

Im taking an operating system course. i understood the code that solved the consumer - producer problem using semaphores. but what i didnt understood is where do we use these codes...what kind of processes uses this code ?

Member Avatar for Salem
0
101
Member Avatar for awoc

The following steps describe how to derive the approximate area of x^2: 1. Determine how close the approximate area needs to be to the true area (tolerance): User Specified Accuracy Difference is LESS THAN accuracy = 1 0.5 X 10-1 = 0.05 accuracy = 2 0.5 X 10-2 = 0.005 …

Member Avatar for Salem
0
84
Member Avatar for programmer321

Hello, I have written a test code for signal handling. The code is compataable for both Windows and Linux. The code is as: [code=c] #include <signal.h> #include<stdio.h> #include<string.h> #include <sys/types.h> #ifdef WIN32 #include <windows.h> #else #include <unistd.h> #endif void intr_hdlr(void); void intr_hdlr2(void); int cnter=0; int sig_cnter=0; int main () { …

Member Avatar for programmer321
0
172
Member Avatar for JFBiomed

I've got some fairly expansive code for musculoskeletal simulations that I'm altering. I've double and triple checked my code segments, but I've been banging my head against this particular error for some time. I'd appreciate any elucidation you kind fellows can pass my way. If any further code, etc would …

Member Avatar for JFBiomed
0
238
Member Avatar for electromania

In the below code im getting a year from the user. but when I print of the year from scanf is doesnt print the correct value such as 2010 will be printed as 74.43434 (somthing like this). If i change the scanf from %.3lf to %f or %d the program …

Member Avatar for electromania
0
83
Member Avatar for shadow_shooter

Hello everyone, I'm working on a project, each time two numbers are read from a text file. Text file contains two lines of sequational numbers, something like this: [ICODE] 4 5 2 1 10 8 3 4 6 1[/ICODE] I have two linklists and each node is able to store …

Member Avatar for shadow_shooter
0
301
Member Avatar for Taker

[code] #include <stdio.h> struct places { char places1[100]; char places[10][10]; int distances[10][10]; }; main() { int menu; char userinput1[10]; char userinput2[10]; char userinput3[10]; int cost; int other; int a; int b; int c; int distances; char places[50]; struct places names[10]; FILE *fp; /*creates a file pointed named fp*/ /* reading …

Member Avatar for Taker
0
208
Member Avatar for usman_2x

Hi Guys, I'm new to C and OpenCV, my postgraduate project requires me to find different body parts in an image, like legs, hands and torso and head. And then determine if the person is lying on the ground or standing upright. Please help if you have some ideas. Thanx

Member Avatar for Nick Evan
0
101
Member Avatar for electromania

Hi All, I've written a program, it has a main and lots of functions. Now i need to make a project from the code. Could some tell me what to do. I want a main.c a misc.c and misc.h. Which parts of the program would go in each one? Thank …

Member Avatar for Nick Evan
0
38
Member Avatar for MaestroRage

Hello again! Today's problem is one that is bothering me. My research into it has once again gone to waste, so I hope somebody here can help me understand why this is happening. The problem is everything is working honky dory, however I find myself having to enter the same …

Member Avatar for Aia
0
144
Member Avatar for yoas

Hello... i want to grab the currency value from bloomberg, this is a part of bloomberg html. I want to get USD-SGD value, in this time the value is 1.5198. How can i grab it using c language? please help me, because after this, i will translate to dynamic c... …

Member Avatar for Omarcito
0
112
Member Avatar for LadyPersia

Goldbach's conjecture in mathematics is that every even integer number greater than 2 can be expressed as the sum of two prime numbers. Write a program that prompts the user for a number, checks that it is positive and even, and prints the two primes that sum to it. First …

Member Avatar for jephthah
0
960
Member Avatar for Hodson

I have managed to concur bubble sort, quick sort and heap sort but I've got stuck on pigeonhole sort. I haven't been able to find much on the internet about it. I have wrote some code for it but it doesn't seem to work. I was wondering if any of …

Member Avatar for Hodson
0
324
Member Avatar for Spaiz

I wasn't sure where to put this topic, web or software development... The questions is this: is there a way to build a website with C? (not PHP calling C application) I read the web for a couple of days now, but I can't really find any explanation how to …

Member Avatar for jephthah
0
57
Member Avatar for TheSmokey777

Greetings, I need help with a Simple C program. I have to take input data such as this : Write a C program that will process a series of "words" entered by the user. A word (for the purpose of this assignment) is defined as a sequence of non-white-space characters …

Member Avatar for jephthah
0
104
Member Avatar for fredmac

write a function [I]multiple[/I] that determines for a pair of integers whether the secone intger is a multiple of the first. The function should take two intger arguments and return 1 (true) if the second is a multiple of the first, and 0 (false) otherwise. Use this function in a …

Member Avatar for jephthah
0
102
Member Avatar for fredmac

parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10. Assume that no car parks for longer …

Member Avatar for jephthah
0
343
Member Avatar for shadow_shooter

Hello everyone, I'm working on a project which I should read from a text file. Text file contains two lines of sequational numbers, something like this: [TEX] 4 5 2 1 10 8 3 4 6 1 [/TEX] In the program, I need to find out where exactly a new …

Member Avatar for shadow_shooter
0
116
Member Avatar for Taker

I have wrote this program to do i of 6 thing to 1) Initialise: Read static data from a file and a) store in appropriate data structures at run time b) sort into alphabetic order for subsequent display in the grid. 2) Menu: A menu to support the following: Have …

Member Avatar for Taker
0
184
Member Avatar for edek

What I would like to do is to redirect stdout of some application, let say A to another application, let say B. All this from another external application (written in C). Any ideas?

Member Avatar for Salem
0
84
Member Avatar for El Duke

Hello Everyone, I am not that expert in coding, just coding on a level that helps me to implement some wireless modules /packets/ links/ etc.... I was wondering if we could implement AI search algorithms using C code, as an example, in this image: [IMG]http://planning.cs.uiuc.edu/img338.gif[/IMG] It is the Bidirectional search …

Member Avatar for El Duke
0
97
Member Avatar for bhaltulpule

I am relatively new to C. I need to use to convert values generated by an A to D converter (000h to FFFh) into floating point numbers. One way that this can be done is using the Float command as in x = (float) y. Is there a better way …

Member Avatar for Salem
0
108
Member Avatar for Swift7625

Hello All, I have been trying to convert a long long to a char buff and having problems. I have tried spintf, and some casting but still can not get the conversion right. Any help would be great! Steve

Member Avatar for Salem
0
426
Member Avatar for Gerritt

The code is working as I want it to. I am supposed to use pointer syntax, and this seems to me working. I just wanted to run it past some of the people who know what they're doing first. [code] /*===============================================================*/ void add() { int vala, valb, valc, count=0, bog …

Member Avatar for jephthah
0
110
Member Avatar for missileh

Hi..., I just wanted to ask what are the posible scenarios where we could use function pointers in C... If anyone out there has any example then please do tell me....

Member Avatar for jephthah
0
140
Member Avatar for nelledawg

Hi guys, Ok so I need to use pointer syntax for the functions init-costs(), show-costs() and toUpper() in the following code. I'm still working on the first two, but I'm curious as to what needs to be done to the toUpper() function. I'm pretty sure I've already done the pointer …

Member Avatar for jephthah
0
114
Member Avatar for pralu

[B]can any one tell me what is socket descriptor in socket programming in c.[/B]

Member Avatar for jephthah
0
396
Member Avatar for soosai

hi there .. whats wrong with th e following code? [code=c] #include<mpi.h> #include<stdio.h> #include<math.h> void main(int argc, char **argv) { int rank, row, i, j,s,p ; int n; int oldrow,oldcol,newrow,newcol; MPI_Status status; int z; int delta_x,delta_y; int temp_map[60][40]; int map[60][40]; int col; z=oldrow,oldcol,newrow,newcol; temp_map=0; map=0; printf("pls enter the row value\n"); …

Member Avatar for Salem
0
141
Member Avatar for Drake

When using functions in C, i cannot seem to make my table of options apprear on screen. I have put it in but it will not appear. The options i have put in work fine, for example press 1 to calculate voltage. This works fine and the answer is given …

Member Avatar for Narue
0
142
Member Avatar for wsn

Hi, I'm trying to make a makefile but after i enter the command make makefile it says nothing to be made in the makefile, can someone please help me? Nd.c depends on Pd.h Pd.c depends on Pd.h Md.c depends on md.h md.h depends on Rd.h # Makefile CC = gcc …

Member Avatar for wsn
0
125

The End.