15,552 Topics
| |
Hi Guys, I am trying to read each line from a file into a Sybase database table. I'm trying to implement string tokenization so i can format each field correctly because i was getting datatype violations :S The code I have is: - [code] if ((infile=fopen("datafile","r")) == NULL) { printf("Unable … | |
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 ? | |
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 … | |
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 () { … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 | |
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 … | |
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 … | |
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... … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
| 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 … |
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 | |
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 … | |
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.... | |
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 … | |
[B]can any one tell me what is socket descriptor in socket programming in c.[/B] | |
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"); … | |
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 … |
The End.