15,540 Topics

Member Avatar for
Member Avatar for Toysh

I am a beginner trying to write a program for my intro C class. I am trying to write a program that calculates the combination of numbers given a specific output by the user. The number has to be between 1-10 to be valid. I am not allowed to use …

Member Avatar for peter_budo
0
473
Member Avatar for Rmitboy

I am writing a c program to copy content of one text file to another but with the copied lines in the destination file preceded by the length of the line and a blank space. Let me illustrate my expectation: original.txt destination.txt daniweb 7 daniweb forum 5 forum plz help …

Member Avatar for jephthah
0
183
Member Avatar for Xufyan

hello, is there any way to call a specific variable from a function ? see the following program. [CODE] float abc(void); float main(void) { float a,b,y,z; a=abc(); b= printf ("enter value for z"); scanf ("%f",&z); y=(a-(a*y))/(b*z); printf ("%f",y); } float abc(void) { float x,p; scanf ("%f",&x); p=x*x; return(p); }[/CODE] in …

Member Avatar for Xufyan
0
108
Member Avatar for daveoffy

Hello, I have been trying to setup mysql API with C. I followed tutorials but I don't think I am installing the API correctly. Could someone tell me the package to download, and what to do with it. Thank you very much.

Member Avatar for daveoffy
0
260
Member Avatar for jgehlot09

I have a file name fun.c contain the fuction to add two number (addnum(a,b)).Now I create another file name callfunc.c.Here I want to call the function (addnum(a,b)) from the file fun.c. How can I do that?.

Member Avatar for jephthah
0
228
Member Avatar for RexxX

I've learned to write bytes from a file by reading the entire file into a character array and then writing them out to another file using fwrite. Of course, my teacher told me this is both wasteful and a file might not fit into memory, so I should use another …

Member Avatar for WaltP
0
174
Member Avatar for NRaf

I'm going crazy. I've been trying to a linked list of a struct (which stores some strings and a character) however I've had no luck. It's just not working and I've been working on this for hours on end. Note: StorePtr is a pointer to the Store struct (which stores …

Member Avatar for jephthah
0
120
Member Avatar for lavendon89

I'm writing a program to read data and store it to file. However I am a bit confused by the EOF statement, and how to get my program to stop reading when there is no more data to read. My code looks like this [code]while((c=fgetc(fin2))!=EOF) { if(c=='#'){ while((c=fgetc(fin2))!='\n'){ }} else{ …

Member Avatar for WaltP
0
94
Member Avatar for bleutana

im writing this program for an intro to c class, I was wondering if anyone knows whats wrong with this code? it says theres an error with the first else, if i take the curly brackets out it says theres a problem with all 3 else's. Thanks. [CODE]#include <stdio.h> int …

Member Avatar for bleutana
1
71
Member Avatar for prade

There are many inbuilt functions for drawing lines in turbo c..is there any similar functions in ncursers library.....please tell me some equilvalent functions for setfillstyle() in the ncurses library. Thank u

Member Avatar for jephthah
0
162
Member Avatar for scrappy57

hello friends can anyone please help me with a C version of a brute force cracker in which i can compare with a selected string and identify for a match.. the c version is in the link bellow [url]http://www.daniweb.com/forums/thread121991.html[/url] cheers

Member Avatar for Adak
0
86
Member Avatar for ChrisXxX

Are there any functions built in C to display the current time and date, and if there is could someone display its syntax Thanks.....

Member Avatar for ChrisXxX
0
107
Member Avatar for jaymeaux77

Hi, I am working on a small program that converts English to Morse code and back into English. The input is read from a file specified by the user no matter which way the conversion is going. I figured out the english to morse conversion pretty easily, by just reading …

Member Avatar for jephthah
0
264
Member Avatar for vathsala1

Hey ppl, I'm doing a project which needs serial communication. I'm sending and receiving data from a PIC through the serial port. I'm using Windows XP and dev cpp. I'm succesfully sending data by my program to the PIC. I'm using inpout32.dll file to access serial port because windows dosen't …

Member Avatar for jephthah
0
207
Member Avatar for vamsi51

how to go about tis program [CODE]int array[26] for(i=0;i<=25;i++) { array[i]=`A`+i; printf("\n %d %c "array[i],array[i][/CODE]

Member Avatar for Ancient Dragon
0
84
Member Avatar for shahab.burki

Hi, I am developing a client and server in C. Client encrypts some data and sends it to the server. The server receives the data and prints it out. I am using AES 128 bit encryption in CBC mode. But at the server side I am unable to receive any …

Member Avatar for shahab.burki
0
200
Member Avatar for deeep

Hello Guys, I have found many source codes to implement linked list. But all are inserting or deleting the node values after user's choice. I dont want that. Insertion should happen dynamically. I have a client program running on another system. I fetch the data from that system through my …

Member Avatar for deeep
0
203
Member Avatar for prade

hi can anyone tell me how to use the bgi library for windows in code blocks compiler...i have downloaded the libraries but dont know how to use it...please tell me the procedure

Member Avatar for jephthah
0
111
Member Avatar for martinjcloud

Hi im trying to allocate memory using malloc(). Also, im trying to make a copy of the string before i allocate it. So im using strcpy(). But im still having issues with compiling it. please help!! [CODE] #include <stdlib.h> #include "setup.h" char *run( const char * const str ){ strcpy(str) …

Member Avatar for martinjcloud
0
135
Member Avatar for bucwet

Hi all, This is a script that reads in text from a file and separates it into characters. It works fine as long as MAXSTRLEN is under 610000. However, I need it to read in whole books of text. Whenever I try to bump that number up above 610000 or …

Member Avatar for bucwet
0
220
Member Avatar for habib_parisa

Dear all, I am writting a code for high dimensional chebyshev interpolation. Since it is high dimensional, I MUST use extremely large arrays. Something like this: [CODE] #define DIM (int)2 #define TOTAL_STEPS (int)30 int main(){ double *a_data; long long a_dim; /** length of matrix a_data **/ int n; /** # …

Member Avatar for jephthah
0
184
Member Avatar for Takarakujin

I want to hold user input strings in an array and be able to print it. Is there a way for me to hold string 1 in arr[0], string 2 in arr[1] and so on and so forth? heres what Im thinking [CODE] int p=1, r=3, l=0; char arr[255]; while(p …

Member Avatar for Software guy
0
77
Member Avatar for johndoe444

It is said in many places that comparing two floating numbers for equality can give wrong result and we have to take into account some epsilon value like this float f1,f2; if (f1-f2<epsilon) printf("gotcha"); So what is the reasonable estimate of epsilon? My intuition is that that has to be …

Member Avatar for jephthah
0
178
Member Avatar for johndoe444

how does long and long long differ? The machine I am using has core 2 duo processor. It shows the same size (8 bytes) for both of them. Was short type ever was 1 byte and changed to 2 bytes later on? Was long and int ever was 4 byte …

Member Avatar for Ancient Dragon
0
187
Member Avatar for prade

hii i just downloaded a dev c++ compiler...& wrote the basic hello world program...whenever i try to compile ..my quickheal antivirus deletes it as a trojan...please help..i reinstalled it but gives the same result

Member Avatar for Ancient Dragon
0
167
Member Avatar for Slobodino

I need an algorithm for the following problem: There's a tree with N fruits each with its own weight w[i] and height h[i]. I can only reach a fruit if it's no taller than H inches. Also every time I pick a fruit, all the other fruits in the tree …

Member Avatar for craig_ka
0
128
Member Avatar for scrappy57

hai friends can anyone give me an example of a program to hash using crypt(3) thanks linux learner.

Member Avatar for jephthah
0
380
Member Avatar for evansjahja

Guys, I need help When I compile my code, I get [code]error: invalid operands to binary ^ (have ‘float’ and ‘double’)[/code] Here's some portion of my code: [code=c] #include <stdlib.h> #include <stdio.h> ... float freq; const float key_magic = 2 ^ (1/12); ... freq=440*(key_magic)^(atof(optarg)-49); [/code] Thanks

Member Avatar for 0x69
0
3K
Member Avatar for ani_joe

Can anyone tell me the valid priority values? positive or negative??I have two threads spawning from the main() , say thread1 and thread2. thread2 always executes much faster than thread1. I want the other way round, because thread1 is much more important than thread2 in my program. Hence I was …

Member Avatar for jephthah
0
88
Member Avatar for geekgirl2011

I've got this game almost working. When I run it in my complier is "blows" up at this line: [CODE]if (facesInHand[numberInHand2][1] != 0 && facesInHand[numberInHand2][2] != 0 && facesInhand[numberInHand2][3] != 0 && facesInhand[numberInHand2][4] != 0 && facesInhand[numberInHand2][13] != 0) straight = 1; else straight = 0;[/CODE] and continues through the …

Member Avatar for geekgirl2011
0
113

The End.