15,551 Topics

Member Avatar for
Member Avatar for Mattpd

So I have this project to program an "auto parts management" C program. Basically I need to be able to add and delete lines of text from a text file. Also, I need to be able to edit lines of text. Lines of text are in the format: PART NAME …

Member Avatar for Mattpd
0
151
Member Avatar for klackey19

I am writing a program that sorts an array of either floats or doubles -- this is specified at compile time via a command to the compiler. I also must use void pointers. My program compiles, but when I try to run it with floats I get a "segmentation fault" …

Member Avatar for klackey19
2
308
Member Avatar for TheBeast32

Hi, I installed cygwin recently and wanted to do some network programming with it. Since I have never used unix sockets before, I'm reading Beej's Guide To Network Programming. I took this from section 5.1 and tried to compile it. I get a few errors that I can't figure out …

Member Avatar for developer_borja
0
669
Member Avatar for SSc

Hi! I'm new to programming and have difficulties in working out the following two examples: [IMG]http://www.pictureupload.de/originals/pictures/241109145734_Unbenannt.JPG[/IMG] hope someone can help me

Member Avatar for donaldw
0
85
Member Avatar for Iam3R

[CODE] enum fivenums {Z,O,T,TH,F,FI} int main() { char ch; int num; do{ scanf("%d",&num); switch(num) { case Z: printf("ZERO\n"); break; case O: printf("ONE\n"); break; case T: printf("TWO\n"); break; case TH: printf("THREE\n"); break; case F: printf("FOUR\n"); break; case FI: printf("FIVE\n"); break; default : printf("Invalid\n"); break; } getchar();// to eat '\n' terminator so …

Member Avatar for kvprajapati
0
83
Member Avatar for klackey19

Hey everyone, I'm coding a program in C and have a pointer called pRoot. I need to do (2 * pRoot) .. but the compiler says I cannot. Is there some legal way of implementing this pointer arithmetic? Thanks in advance for your help!

Member Avatar for Narue
0
142
Member Avatar for neithan

Hi, i'm just mixing file handling and struct types and pointers to learn, but i'm a little stuck on this. I might be doing something awfull i can tell, sorry for that. Can anyone help? What's the best way to pass [CODE]#include <stdio.h> #include <ctype.h> #include <string.h> #include <stdlib.h> struct …

Member Avatar for Narue
0
117
Member Avatar for Soileau

I am trying to write a function to add two arrays. The catch is that the arrays have to parts of a structure. So here is what I have so far: [CODE]#include <stdio.h> struct poly { array1[]; array2[]; length; }; void polyadd(int array1[],int array2[],int length) { int i; struct poly …

Member Avatar for dan63043
0
126
Member Avatar for Gaurav arora

hi! i m Gaurav. i m facing a problem in printing a series i have print the series related to it. like * * * * * * * * * * * * * * * but i m facing a problem in printing the following series: * * …

Member Avatar for ashutosh1234
0
99
Member Avatar for SimonLeefe

I have an arbitrary number of files whose names I will know and I want to open them for reading. The important point is that I do not want to open them sequentially using a single file pointer. I need to have them all open at the same time. This …

Member Avatar for SimonLeefe
0
200
Member Avatar for Mattpd

I have written some bash shell scripts, using grep and sed. Are there any functions in C that do something similar to grep and mainly sed? I need to be able to edit and delete individual lines of text in an external txt file, based on user input.

Member Avatar for Ancient Dragon
0
98
Member Avatar for cmk2901

Hi, I have a char* buffer that is 1024 bytes in size, and am trying to write an int to a particular offset in the buffer, in this case 0, but all offsets have the same problem. I initialize the buffer to some values when I first start up. For …

Member Avatar for Ancient Dragon
1
170
Member Avatar for hjazz

Hi all, I'm new to using Visual Studio. I'm currently using VS .NET 2003 on Vista, and I'm trying to port a program from Linux to Windows. The program uses the pcap library. I have installed WinPcap 4.0.2 and downloaded the Developer's Pack WpdPack_4_0_2. However, I have no idea what …

Member Avatar for Ancient Dragon
0
234
Member Avatar for frank_hugo_1100

can any one put me on the start of using serial port? i need to know the pins and protocols to use serial port, i know alittle information and how we configure it by using c programming language and visual c++.if there is asite to learn me using serial port …

Member Avatar for mbit.dbms
0
287
Member Avatar for nhamyl

this program has information about customers. this program has to perform the following functions. - display list of all customers - search by name - search by id - display list of customers having credit limit above 5000 - add new customers i am unable to compile the program. here …

Member Avatar for jonsca
0
141
Member Avatar for shahab.burki

Hi, I am trying to develop a small IPv6 application in C. I am stuck at server side. GCC issues the error while call to ACCEPT function "socket function on non-socket". Can anyone help me? 1. Client Code [CODE]#include "shahab.h" int main(int argc, char **argv){ int connectSocket; int numberOfBytes; char …

Member Avatar for gerard4143
0
246
Member Avatar for markeen

[code] #include<stdio.h> #include<conio.h> int main() { int x[5], y[5], z[5], i, d; for(i=0;i<5;i++) { printf("Enter int%d: ", i); scanf("%d", &x[i]); } if((x[0]>x[1]) && (x[0]>x[2]) && (x[0]>x[3]) && (x[0]>x[4])) { y[0]=x[0]; if((x[1]>x[2]) &&( x[1]>x[3]) &&(x[1]>x[4])) { y[1]=x[1]; if((x[2]>x[3])&&(x[2]>x[4])) { y[2]=x[2]; if((x[3]>x[4])) { y[3]=x[3]; y[4]=x[4]; } else if((x[4]>x[3])) { y[3]=x[4]; y[4]=x[3]; } …

Member Avatar for Ancient Dragon
1
120
Member Avatar for neithan

Hi everyone, i have this portion of code [CODE=c]while(c = getc(file) != EOF)[/CODE] c is an int and file is a FILE *file = fopen(filename, "r"); The filename points to a file with 2 lines, 10 characters total. That while always makes c a value of 1 (accodring to ASCII …

Member Avatar for neithan
0
99
Member Avatar for ROTC89

ok so i am having problems with my program. its a client program talking to the server program. i have both programs working fine but i do not know how to get the conversation to display on the server side of the conversation. here are the codes and makefile [code=c] …

Member Avatar for ROTC89
0
131
Member Avatar for cmsc

I want to make a dynamic array. but when I view the array, I think there's something wrong with the index part. Please help. Thanks! here's my code: [CODE] #include<stdio.h> main(){ int* a; int number; int choice; int index = 0; int head; while(choice!=4){ printf("\tMENU\t\n"); printf("[1] add number to array\n"); …

Member Avatar for cmsc
1
90
Member Avatar for Cmad

Iam currently working on the design of preemptive scheduler iln Borland C. I want to know about the use of interrupts and timers in Borland C for preempting the task. Just clue of upgrading about them is enough.

0
63
Member Avatar for dieom

What I am trying to accomplish here is to split a long integer apart so I can look at its first, last, and center digits. What I am currently using is this: [code]int main() { long i, t[1024]; i = 100; while (i < 150) { t = i; // …

Member Avatar for Ancient Dragon
0
90
Member Avatar for dewdropz

hi, i am new to c have to write a program to check the shape. I think the error is somewhere at shape= square. I know i can use printf statements but i want it in this format. Can someone help me please? [code] #include <stdio.h> int main (void) { …

Member Avatar for Ancient Dragon
0
209
Member Avatar for MeBjess

I have been working on a basic accounting program, the accounts were supposed to be stored in a array, but I never got that part of the program working. Is there anyway I can get a sample of hash code that would help me understand what I need to do? …

Member Avatar for MeBjess
1
90
Member Avatar for rahul.nutron

I have to create a matrix in c from microarray data that so I have to read each string line wise and compare they are related or not. help me....[b]***[/b]

Member Avatar for Ancient Dragon
0
53
Member Avatar for Iam3R

Hi , this one is with respect to C. (i) when we use array an array index always starts from zero . is it a standard one? or compilers are implemented that way? if compilers are implented that way they must have followed some standard. (ii) the array name cannot …

Member Avatar for Iam3R
0
89
Member Avatar for Mattpd

If I run the program, and select q, it will quit correctly. If I select e it goes to the edit menu [B]but prints it twice[/B]. If I then select q it goes to the main menu [B]and prints the default case, "please select from menu", then prints the main …

Member Avatar for kvprajapati
0
115
Member Avatar for thebluestar

Here is the problem:write in saparate function without using global variable 1/(function input)enter N in the range [0,20], then enter N numbers 2/(function display)Display N numbers in 2 columns Here is my source code [CODE=C] #include<stdio.h> #include<conio.h> void Input(int *p,int n) { int i; do { printf("Enter N numbers u …

Member Avatar for death_oclock
0
108
Member Avatar for cokacola

The purpose of the program is to take a position and count how many "pixels" are in the "blob". If there is no "pixel" aka the value is 0, the blob number is 0. If there is a pixel, the blob_check function recursively checks the surrounding cells for "pixels" aka …

Member Avatar for death_oclock
0
119
Member Avatar for Mattpd

In the title I was going to write (not C script) but they are essentially the same I think. My bad, anyway... I recently wrote a some SH scripts to manage lines of text in a separate txt file. Now my new assignment is to convert the whole thing to …

0
66
Member Avatar for Tamaki

At least for me it is:) This is an assignment problem and I can really use some help! [B][U]INTRO TO PROBLEM:[/U][/B] So the problem is a basic logic problem, where I'm sure you're all familiar with... From my assignment page, the problem [CODE]Imagine that you have 2 jugs, a small …

Member Avatar for Tamaki
-1
77
Member Avatar for sahasra

Hi, I am new to this site. Can you please help me with this. I have written a C program and i m getting the following errors 1) " 'puts' was not declared in scope " the same error for 'gets' and 'itoa' command...i have included stdio.h,string.h,stdlib.h,math.h as the header …

Member Avatar for kenji
1
139
Member Avatar for beatenbob

Hi all. Just a simple question but I SERIOUSLY need some help from you guys for my programming assignment. The assignment given was water jug problem. Now my question is, does C allow for the creation of dynamic array during a recursion? Suppose I have another function, which returns a …

Member Avatar for gerard4143
1
411
Member Avatar for xavier666

[B]This is just a linked list program for those who need help understanding the fundamentals. Put comments if you find some bugs. The program is about maintaining a student database (their roll number and their age) I've used Turbo C++ 4.5 as the compiler[/B] :icon_cool:

Member Avatar for xavier666
3
210
Member Avatar for dena

hi please can any one help me in my shell project like this : Develop a c program which serve as s shell interface that accepts user command and then executes each command in separate process. The shell interface provides a command prompt ( sh> ) after which next command …

Member Avatar for dena
1
725
Member Avatar for agentmusic

Hello Im trying to compile the following code but I get the error "left operand has incompatible type" because of the line: test2_2_U->Out2= test2_2_U->Out3; I have been looking through the forum but I couldnt find a hint what Im doing wrong. Any hint is appreciated. Thanks Thomas [code=c] static BlockIO_test2_2 …

Member Avatar for agentmusic
0
897
Member Avatar for lathachowdary
Member Avatar for lisedaton

hi all!!, can somebody help me?? I need to do a program that scan a decimal, transform it to binary and check if it is palindrome or not and print "palidrome" or "not palindrome".... i can only use functions and cant use arrays or anything else! can somebody help me??? …

Member Avatar for flipjoebanana
2
1K
Member Avatar for Ineedhelpplz

So everything in my program works except for the main itself. The program is supposed to take in a file provided through standard input and print out the descending order of words followed by the frequency that they occur. I can do this individually line for line but am having …

Member Avatar for Ancient Dragon
2
157
Member Avatar for flipjoebanana

Hello, If I want to say compare a line at a given line number to another line at a different given line number how can I do this? I know I could iterate through the file and store the lines into a data structure and perform comparisons that way but …

Member Avatar for Ancient Dragon
0
105
Member Avatar for kolosick.m188

I am having a slight problem implementing this code. What I need to do is take a list of 16 unsigned characters and permute the bits according to IPTable. 0 in IPTable refers to bit 0, 1 refers to bit 1, etc. Here is my code which isn't working. [code=c] …

Member Avatar for Dave Sinkula
1
107
Member Avatar for bufospro

Hi, I want to make a program that reads a string. But I would like to read only characters, neither numbers nor special characters(@,#$%^&*()!). Also, no spaces between characters. [CODE] #include <stdio.h> #include <string.h> char *enter_a_string(int maxcharacters) { char *ptr; int len; printf("Enter string : "); char array[50]; do{ scanf("%s",array); …

Member Avatar for bufospro
1
107
Member Avatar for jk2005.jeeva

Hi Anyonem, could you please explain clearly about the order of evaluation of increment, decrement operators in an expression in C? Thanks in advance..

Member Avatar for kommuru
0
380
Member Avatar for siggivara

I'm trying to create a simple server that starts a new thread for each new client that connects. I know I can use fork(), but I've heard that threads are more efficient. Also I have some global queues, so if I used fork(), each process would get their own version …

Member Avatar for flipjoebanana
0
88
Member Avatar for eskaflowne

now I have never posted before so I hope this is in the right spot/format.. this problem is driving me insane. I need prove the Goldbach conjecture that is, "every even integer n > 2 is equal to the sum of 2 prime numbers." Then with a starting point and …

Member Avatar for flipjoebanana
1
111
Member Avatar for jmangu

Hello, I'm trying to compile a program related with serial communication via RS232. I've found this program at microsoft page [url]http://support.microsoft.com/?scid=kb%3Ben-us%3B39501&x=9&y=11#top[/url]. When I try to compile this same program in Dev C++ editor the following message appears: bios.h: No such file or directory. Please, help me about what can I …

Member Avatar for Ancient Dragon
1
3K
Member Avatar for Hanyack

im new at C, actually just started programming in general, and im having a good amount of problems with this program. [code=c] #include <stdio.h> int main(void) { char vehicle; char car; char truck; int hrsn, minn; int hrso, mino; int time; int rt; int amo; printf("What time did you park(military …

Member Avatar for uskok
0
587
Member Avatar for ubi_ct83

Hi experts, i have this line of string: a1,b2,c3,a2,b1,c2,a3,b2,c4, from this line,i want to load into a string array like this: array[0]=a1,b2,c3, array[1]=a2,b1,c2, array[3]=a3,b2,c4, seriously i have no idea at all.ive done sumthing but looks like rubbish.i really hope dat u experts can help me. thanks for advance [CODE] void …

Member Avatar for Ancient Dragon
0
87
Member Avatar for arsh_arsh

i have a problem in which i have to remove char from strings by sending one string and char ata time to a function. in the below code it works fine for first string but for each successive string initial characters are not passed ..like for second call first chatcter …

Member Avatar for gerard4143
0
111
Member Avatar for aman rathi

helllo last day i did program related to recursion that is factorial of numbers i red lot of books in my library but i found only this program only in every book. i also thought lot on recursion but i did not find any more program please can anybody tell …

Member Avatar for Cmad
0
119

The End.