15,540 Topics

Member Avatar for
Member Avatar for noorf

Hi everyone :) This is one of my first programs using C, so I am facing some issues. our professer asked us to develop a TCP socket (client/server) where the client sends lets say an ID,Name or Major and the server searches into a txt file and returns the line(s) …

Member Avatar for Trentacle
0
260
Member Avatar for Sushi

I'm trying to write a function that gets an array, it's size and the number I'm looking for. The function should be recursive. That's what I've written, it doesn't work. I don' understand why. Suggestions are welcome. [code=c] #include <stdio.h> int binary (int *a, int n, int num) { int …

Member Avatar for WaltP
0
277
Member Avatar for terence193

Well , I am trying to create a bees game as part of my assignment .. Now in this simple game I should use a text file .. and the text file is to create different game stats in different lines.. eg.. "10 (number of bees) 0 (number ofinfected bees) …

Member Avatar for Trentacle
0
113
Member Avatar for harrismahadevan

hi! I'm MCA 1year student. I want tree traversal program for given Alphabets not numbers.. Can anyone response my thread.. Thank U..

Member Avatar for Narue
0
37
Member Avatar for roona

Hay every one Hay everyone I need help I have project in subject programming languages about make one idea on two languages c and java . I have made it in java and c++ but I couldn't in c This is the code in C++ [CODE]// Link.cpp : Defines the …

Member Avatar for VernonDozier
0
227
Member Avatar for manaila

I have the following URL which I want use to access the content in a remote Apache Tomcat server from a C-based client: [CODE]char url[] = "POST /myDir HTTP/1.1\x0D\x0AContent-Type: text/xml\x0D\x0AContent-Length:60\x0D\x0A\x0D\x0A<root><mygreeting>Hello, World!</mygreeting></root>\r\n";[/CODE] However, I get the response [B]"HTTP/1.1 505 HTTP Version Not Supported"[/B]. I have googled and found that this may …

Member Avatar for manaila
0
160
Member Avatar for newbie14

Dear All, I can insert data into mysql db already via my C codes. The only problem now I need insert the time in this format "2011-12-11 09:01:02". How can I format this in my C codes? Thank you.

Member Avatar for newbie14
0
79
Member Avatar for adohertyd

I am writing a spellchecker program and have some issues. First thing is that I need to make better use of the memory. My code iterates through a large dictionary file repeatedly. I know its better to read this into memory first then iterate through the block but I really …

Member Avatar for VernonDozier
0
205
Member Avatar for placebo1

i want to read parameters from a file. but the program reads all parameters as if they are zero.any help? here is the code [CODE] typedef unsigned long int WORD; unsigned long int parameters[2]; WORD pt1[2]; void readConfig() { char a[3]; FILE *p; p = fopen("config.data", "r"); if (p) //we …

Member Avatar for placebo1
0
183
Member Avatar for roona

Hay everyone I need help I have project in subject programming languages about make one idea on two languages c and java . I have made it in java but I couldn't in c this is the code in java [CODE] Class Link // Link.java // to run this program: …

Member Avatar for zeroliken
0
215
Member Avatar for CReza

I have to write persian (farsi) characters to a text file, but after writin when I open the file ,it's contents are unreadeable in persian and ther is some special characters pleaseeeeeeeeeeeeeeeeeeeeeeee help :-(

Member Avatar for v3ga
0
142
Member Avatar for mangatmodi

Something is not going right in the following code. I am taking an array of strings from user and printing at the same time. Array can have [B]noe[/B] no. of strings, as noe is entered by user. [CODE]#include <stdio.h> int main(){ char **p; int noe=0,i=0,j=0; scanf("%d", &noe); p=malloc( noe * …

Member Avatar for v3ga
0
150
Member Avatar for peter20

Hi all, I have to check and give grades to some projects written in C. Do you know a free program which detects source code plagiarism ? I found CodeSuite but it asks me for key. Thanks in advance

Member Avatar for L7Sqr
0
293
Member Avatar for iamcreasy

What is the most efficient way to take input of a character array or string of 25 ASCII characters using scanf? They are not formatted, just a sequence of character. i.e. ABCDEFGHIJKLMNOPQRSTUVWXY One more point is that, after input I have to find a sequence of character within this string, …

Member Avatar for Narue
0
429
Member Avatar for newbiecplusplus

Hi, i'm really stuck with this linked list and i feel tottaly out of my depth. Hopefully i can get it a bit clearer! what im trying to do is a print simulation with three priorities and im trying to make the linked list to act like the queue so …

Member Avatar for bbman
0
133
Member Avatar for evanescence

Hi, there. I've been trying to get my program to work for several hours now and I just can't fgure out what's wrong with my code. It's about passing a variable between processess using pipes. Each process increments it M times. The program works perfectly when I use shared memory, …

Member Avatar for evanescence
0
139
Member Avatar for kikic

I need a problem, i use PIC simulator to import2 numbers by serial port. First I send byte, 5 for example, then send sent 2 and in the third step I sent char for example *, and the result is 5*2=10. Everything is fine till I send larger number more …

Member Avatar for Begginnerdev
0
183
Member Avatar for bonett09

Hi guys, I have a problem with this question, where the amount is constantly $0 and at the end if the user enters Y/N it just closes without saying "Transaction Completed/Cancelled". Any tips on how to fix it? Thanks [CODE]#include<stdio.h> #include <iostream> #include<math.h> int main() { int numofbees; float price …

Member Avatar for WaltP
0
134
Member Avatar for gman1991

[CODE]int main(void) { int operations, i, operands; char *string_dig1, *string_dig2; // OPEN THE FILE FILE *ifp; ifp = fopen("bigint.txt", "r"); fscanf (ifp, "%d", &operations); printf("%d\n", operations); // MAKE MEMORY TO READ THE STRING DIGITS INTO THE ARRAY string_dig1 = (char *)malloc(sizeof(char)); string_dig2 = (char *)malloc(sizeof(char)); for(i = 0; i <= …

Member Avatar for gman1991
0
236
Member Avatar for ben25x

Hello, I've been having a lot of trouble with a variable type called "float64". I'm trying to create a do{}while loop to make the number count up each time. data is also defined as an array. [CODE]float64 data[1]; int i; do{ for(i=0;i<1;i++) { data[i]=data[i]+.01; if(data[i]>9.99) data[i]=-9.99; } }while('0'=='0');[/CODE] Any guidance …

Member Avatar for ben25x
0
125
Member Avatar for naz1234

Hello there,ihave given the assigment to make the c program to print the asterisks to represent the grades.. My question is , why the asteriks does not appear ? I think i got problem at the looping for asterisk.. actually my output should be like this : the graph such …

Member Avatar for naz1234
0
169
Member Avatar for The 42nd

Hello. The title pretty much says it all. I would like to know if and how you can print a number (type is double) with the same amount of decimal spaces as the one you entered. If I enter 12.34 I would like the output to be 12.34 and not …

Member Avatar for Narue
0
229
Member Avatar for denislaf

Hi everyone! I have a task that needs to be made in C in Linux. I use Kubuntu. This is the task: Process (coordinator) creates 10 working process (pool of processes). The working processes are waiting to be awakened by the coordinator, perform a job and wait again. The coordinator …

Member Avatar for denislaf
0
192
Member Avatar for snowhite89

This is MPI parallel program running using putty software.. I've done some part but I got errors... :'( can anyone tell me what's the problems? I've done the serial part but I stuck in this parallel part....... [I attach smaller input because I'm having problems attaching the real input] I …

0
99
Member Avatar for kkmfazil
Member Avatar for fast2dbeat

write a system program to create a file called myfile1 containing the letters of the alphabet followed the first one hundred integers. Write another program to open the file myfile1 and read it and print the contents on the screen/monitor (stdout). Its an assignment, please help!!

Member Avatar for Narue
0
173
Member Avatar for Captonmike

#include<stdio.h> #include<math.h> #include<conio.h> #include<time.h> #include<stdlib.h> #define LIMIT 100000000 //max value of n void main(){ double mypi,x,y ; int minus ; // 1 for pos., 2 for neg. long int m,n; time_t t; n = 0; m = 0; srand((unsigned) time(&t)); clrscr(); do{ n++; x = (rand()/(double)RAND_MAX); //pick a random X …

Member Avatar for Captonmike
0
185
Member Avatar for p.roberts88

Hi, I can't figure out why this isn't working (it's part of a larger amount of code but I tested it separately and I still get an error): [CODE] int nrows = 5; int ncolumns = 4; int i; int **array = malloc(nrows * sizeof(int *)); for(i = 0; i …

Member Avatar for invisal
0
384
Member Avatar for mochno

Hello All. After couple hours reading posts here and all over the web, i wasnt able to find example of code to "rewrite it" my way. All i need is: 1. read the file (txt), 2. scanf for string, 3. compare each line for this string, 4. if found printf …

Member Avatar for mochno
0
136
Member Avatar for coolfriends

Hey guys, I am working on this square deal problem that I cant figure out. This is the problem: Input for this program will be two positive integers entered from the keyboard via scanf. The first will be an odd integer N in the range of 3 to 15. N …

Member Avatar for 1qazxsw2
1
190

The End.