15,552 Topics

Member Avatar for
Member Avatar for dondajr

Hi guys o/ ! I'm trying to make a program that write in text file some datas. Then, i wrote a header that have all functions I need to write in this file. thas is my header: [CODE] #ifndef _SNAPSHOT_H #define _SNAPSHOT_H #define LAST_PRICE 0; #define BEST_ASK 1; #define BEST_BID …

Member Avatar for jephthah
0
150
Member Avatar for nateuni

Hi, I transferred Uni, and got an advanced standing for some prior study, but the current unit I am enrolled in builds on an advanced understanding of ADTs (and link lists etc). Problem is that - I have not previously learned this information. My unit text - Algorithms in C …

Member Avatar for Etherwind
0
95
Member Avatar for neodregan

I want to try to understand the method of using POSIX threads to interact with a sorting algorithm such as the odd-even transposition sort. I have written my program to do a odd-even transposition sort without threads and this is my current result: ./sort data File opened successfully. The numbers …

Member Avatar for Banfa
0
169
Member Avatar for Encrypted

I'm trying to write a program for class and I can't get my fractional exponent to work. I've tried using 2/3 2.0/3.0 and I've tried entering 2/3 into a separate variable, but nothing seems to work. I don't get any errors while building 2/3 but the logic does not come …

Member Avatar for MosaicFuneral
0
389
Member Avatar for bops

Hey all, I was just wondering, is it safe to do something like this? [code] char *msg; sprintf(msg,"Forename: %s", fname); //where fname has been previously defined as char fname[ ] = "Jonathon"; [/code] My main query is around the allocation of the memory for msg. I know there are memory …

Member Avatar for Raptor007
0
1K
Member Avatar for crimsonwave

Hi im writing a C program to read in wav files. How am i able to VERIFY/CHECK whether the wav file have been read in correctly inside the C code? do i do a printf or something like that? thks.

Member Avatar for Banfa
0
155
Member Avatar for nilessss

hi friends i m a comptr eeng. student ı saw your codes then ı felt bad because ı think ı should improve my codes ?so how can improve my codes?ı m 2.class student..thxx

Member Avatar for jephthah
0
91
Member Avatar for DoEds

Actually this is not an assignment or anything... School days are done... Still there's lot of things that i don't know... I just need some ideas on how to make an inventory using files... Basically, the file contains the name of the "Items" "Prices" and the "Amount"... I want to …

Member Avatar for Adak
0
1K
Member Avatar for trenzkun

could you help me????? how can i get an output like this: 2+9*32/3%2=96...it depends on the user on how much operators that he want to use. please help me of what statement that i have to use to have an output like this..... please post an example statement.........

Member Avatar for Adak
0
82
Member Avatar for rhubarb65

Hi I am trying to cross compile a simple program for Windows CE using CodeBlocks. I am using mingw32ce (part of CEGCC) which is a set of tools and libraries for building WCE programs on XP. And some WCE SDL libraries I found here: [url]http://users.uoa.gr/~knakos/scummvm/libraries/release-0-10-0/wince-gcc-libs.tar.bz2[/url] I have succeded in building …

Member Avatar for rhubarb65
0
337
Member Avatar for krishnchaitu

please give me the "C" language code for reversing a two dimensional character array. a two dimensional character array is sent as a parameter to a function which in turn returns the reversed char array. kindly note please give the answer with a two dimensional array only and also only …

Member Avatar for Narue
0
92
Member Avatar for vuki27

I am trying to make a program so that you can enter your name, but I want to limit the amount of characters used to 10. This is what i have so far, and when i press backspace on my program, it doesn't delete the previous character but moves the …

Member Avatar for Narue
0
5K
Member Avatar for deathscythe129

i need help on how to make a calculator program on C. for example: 100+3*(344-45)-3/20= ? ive done a part of it, but it doesnt even give the right answer. the user inputs anything (excluding letters and some puncts). it accepts the equation as a string. ive already converted the …

Member Avatar for trenzkun
0
256
Member Avatar for nastia

I have downloaded relo with mingw compiler. How can I run programm with it? or I should download somthing else? Or maybe you can write me some commands with which I can compile and run programm in command line. thank you

Member Avatar for nastia
0
95
Member Avatar for praneeth_gunda

Hey Every Body can u PLease help me with this this is a code 4 RSA it is workin' for small values of {p,q,e} like {11,3,7} but it does'nt work for {11,17,7} Please help me at this POint even long double is not enough for storing the value of c[i]^d …

Member Avatar for nyagaj
0
153
Member Avatar for abebosco

[CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> #define TRUE 1 #define FALSE 0 #define BUFFER_LEN 240 #define NUM_P 50 void str_sort (char *[], int); int main () { char *s[NUM_P]; int count; printf("Enter the number of count:"); scanf("%d",&count); int i = 0; printf("enter the first string:"); scanf("%s",&s[0]); printf("enter the second string:"); …

Member Avatar for abebosco
0
118
Member Avatar for Aby_G

I am having problem understanding nested loops, esp in making patterns with them. I am able to understand simple loops like these: [CODE]ABCDEFGHIJ ABCDEFGHIJ ABCDEFGHIJ ABCDEFGHIJ ABCDEFGHIJ ABCDEFGHIJ [/CODE] code for this will be: [CODE]#include <stdio.h> #define ROWS 6 #define CHARS 10 int main(void) { int row; char ch; for …

Member Avatar for sganesh
0
162
Member Avatar for infrapt

Hi I have a double *ptr which I use as an array. I am trying to send the address of the ptr to another sub processor. But I can only send 32 bits to the other processor.So its giving me an error makes pointer of type integer without a cast. …

Member Avatar for nezachem
0
129
Member Avatar for mattitude

Hi, I'm trying to write a program that will continuously pull up a text file, search it for anything new, and create/change a different text file if there are ever any differences in the "myfile.txt" that is being constantly searched. The problem is, when I run my code, it consumes …

Member Avatar for jephthah
0
111
Member Avatar for Kombat

If a user enters [CODE]0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0[/CODE] how do I read it in as [CODE] 00000000111010000000011111100000[/CODE]

Member Avatar for WaltP
0
76
Member Avatar for kng

So guys for the sake of simplicity lets say i am developing a huge matrix multiplication program using C and i made a data structure which is able to represent this huge matrix into miniature blocks the down side is that this representation of block takes much more memory than …

Member Avatar for abhimanipal
0
143
Member Avatar for blackrobe

Hello, How can i change the root directory to the current working directory.. I need to use some form of an exec call to run a program found in the current working directory but the problem is that the path of that program is required to start with '/'.... my …

Member Avatar for Ancient Dragon
0
4K
Member Avatar for bunnyboy

So I have the following implementation of linked list: [CODE=c] #ifndef LINKED_LIST #define LINKED_LIST struct Student { char* name; char* surrname; char* signin_number; char* grade; char* date; struct Student* next; }; struct Student* begin = NULL; void push_back(struct Student* student) { struct Student* temp = NULL; if(begin == NULL) { …

Member Avatar for bunnyboy
0
95
Member Avatar for riahc3

Hey I have a use for working with basic binary search trees but I cant seem to find good examples on the basic operations such as sorting, insert data, delete and search for data. Can someone give some basic examples? Thanks.

Member Avatar for Narue
0
49
Member Avatar for prushik

I have written a program for a linux box running on a davinci (arm processor). The program communicates with a server over the lan, calls some scripts, and delays different amounts of time depending on what the server tells it to do. It all works great, most of the time. …

Member Avatar for prushik
0
254
Member Avatar for Interesting_Hat

Hello, I have been stuck with a C program, which I have to write for my foundation degree. I know it's simple, but can't seem to wrap my head around it. Write a program that uses a For loop to: Input three float numbers less than 20 Cube each one …

Member Avatar for stratsp
0
133
Member Avatar for DoEds

I found this code somewhere on the net... But i dunno how to stop this...Its keeps animating and i dont know when will this stop... [CODE]#include <stdio.h> #include <time.h> void sleep ( long milli ) { clock_t end, current = clock(); for( end = current + milli; current < end; …

Member Avatar for jonsca
0
113
Member Avatar for yasaswyg

I tried to bubble sort but when i output it, it gives me funky numbers. Can you help me out. is the bubble sort even right? [CODE]#include <stdio.h> int sort(int a[], int len) { int x, y, t; for (x=0; x < len-1; x++) { for (y=0; y < len-x-1; …

Member Avatar for jonsca
0
94
Member Avatar for Idontknowc

I have to now make a simple single line text editor where the letters i type i can use commands to edit them this is what I started with my knowledge and so far ive got typing happening, if its possible to just input commands that can change the lines …

Member Avatar for Ancient Dragon
0
119
Member Avatar for nanosadra

struct Employee { /* Employee details */ char name[MAX_NAME_LENGTH+1]; /* name string */ char sex; /* sex identifier, either 'M' or 'F' */ int age; /* age */ char job[MAX_JOB_LENGTH+1]; /* job string */ struct Employee *prev, *next; }; static void menu_add_employee(void) { static struct Employee *employee_list = NULL; { …

Member Avatar for Adak
0
213

The End.