15,552 Topics

Member Avatar for
Member Avatar for qwerty_touch

Hello, this forum is for asking the required code and logic behind implementing the "factorial program - i.e. finding factorial of any big number"---could someone help me out???/

Member Avatar for 0x69
-1
158
Member Avatar for rai32

Hello people, i'm new here, and i hope that you can give me a hand with a little client-server software that i'm doing that it's driving me nuts. The essence of the program is very simple, you have this client (in my case cliente.c, as i'm Spanish) with this syntax …

Member Avatar for rai32
0
281
Member Avatar for abaran01

I'd like to write a function in C that takes the current system date adds a user defined number of days and returns the new date. Im new to C so Id like any suggestions . Thanks in Advance.

Member Avatar for Ancient Dragon
0
229
Member Avatar for tquiva

I'm trying to repair a program that computes averages of several values inputted by the user. All values are scanned on one line and taken as an array. My program is nowhere near complete and I'm trying to fix it up little by little. The one part that I am …

Member Avatar for jonsca
0
508
Member Avatar for tots08

Hi! Can any c programmers there help me with this assignment please? I really do not get my lecturer. Conway's [I]life[/I] is a special kind of game. It isn't really a game - just a spectator sport. It is played on a chess board, where each cell is either alive …

Member Avatar for tots08
0
149
Member Avatar for Wizablue

Hmm, I was trying to load strings from a file(formated) to an 2D Array... but.... [CODE] FILE * fp; char TempBuffer[100][100]; char array_game[100][100]; fp=fopen(filename,"r"); for(i=0; i<100; i++) // Create 2D array to Hold the array of the file { for(j=0; j<100; j++) { fgets(TempBuffer,101,fp); strcpy(&array_game[i][j],TempBuffer); } } [/CODE] I get …

Member Avatar for Wizablue
0
487
Member Avatar for mariosbikos

[CODE]#include <stdlib.h> #include <stdio.h> #include <time.h> #define MAX_ROWS 10 #define MAX_COLS 10 static char map[10][10]; void sin1(char map[][MAX_COLS]); void sin2(void); void sin3(char map[][MAX_COLS]); int main(void) { system("chcp 1253 >nul "); FILE *fileptr; char myColchar,apantisi,map[MAX_ROWS][MAX_COLS]; int metritis1=0,apotelesma,myColnum=1,myrow=1,k,a,l,c,row, col; char r,fileRow[MAX_COLS + 2]; // account for newline and NULL printf("dose tin diataksi …

Member Avatar for mariosbikos
0
269
Member Avatar for tquiva

I have a project which is to design a came called Miensfeld. In Miensfeld, the player, Timmy, is located on one side of a 8 by 10 cell area minefield. My task is to move Timmy safely through the minefield to get to the other side, earning points as he …

Member Avatar for Adak
0
3K
Member Avatar for koitfm

I have to read from input file (which contains strings and integers) only integers, rearrange them to descending order and write to output file. How should I do this?

Member Avatar for jephthah
0
4K
Member Avatar for lionaneesh

Please suggest me some tutorials on Windows programming in C with detailed review on windows registry and header files like #include<windows.h> #include<functions.h> #include<fstream> #include<dos.h> etc...

Member Avatar for limodetroit
0
109
Member Avatar for cokaznsyco72

I need to get character input from the user and convert it into a float type. However, I can't use arrays, strings or the functions printf() and scanf(). I have to do everything with putchar() and getchar(). How would I do this?

Member Avatar for DoctorBinary
0
152
Member Avatar for dex.ter

hi guys, here's my code im having a hard time on how to edit. i can add and view it yet unable to edit it. thanks! [code]/* * dental.c * * Created on: 30/04/2010 * Author: danovert */ #include<stdio.h> #include <string.h> #include <conio.h> #include <stdlib.h> typedef struct { char fname[30]; …

Member Avatar for Banfa
0
129
Member Avatar for Yesiid

[code]#include <stdio.h> char *matriz; char n; int cuad; void guardarValor(lin, col, valor) { int pos = ((lin-1)*n) + (col-1); matriz[pos] = valor; } void imprimeMatriz() { int cont; for(cont=1;cont<=cuad;cont++) { printf("%d\t",matriz[cont-1]); if ( cont%n == 0 ) printf("\n"); } } int main() { int cont, posL, posC; n = 5; …

-1
32
Member Avatar for BLUEC0RE

I posted a couple of days ago about this subject but I have a more specific question about programming with music in c. My main question is that are the ID3v1/ID3v2 tags universal for ALL music files or are there a specific tags I should be checking for, for a …

Member Avatar for jephthah
0
121
Member Avatar for martinjcloud

Hello, could someone help me create a program that will take in separate strings from a user and then output it all on one line in random order? This is what i have so far: [CODE] #include <stdio.h> #include <string.h> #include <stdlib.h> int compareStrings(const void *pStr1, const void *pStr2) { …

Member Avatar for jephthah
0
128
Member Avatar for wakingdevil

Hey i got the same error in my code and as discussed i cant rectify it after changing the u value. The error is on a linux machine. The program checks if a no is prime or not. [CODE] #include<stdio.h> int primality(int n) { int i; char ch='y'; for(i=2;i<n;i++) { …

Member Avatar for jephthah
-3
88
Member Avatar for campbellpatrick

Hi all, I'm pretty new to C, so apologies in advance, I am trying to write code that will allow me to input a line no and then display the text from that line from the corresponding file. I'm having a bit of a brain fart & can't work it …

Member Avatar for BestJewSinceJC
1
182
Member Avatar for Voltron160

Hey all this code should read in info and store it to a file. Then retrieve the file and calculate the sum and average of the row and column. But for reason I keep getting rubbish for my sum and average output. can someone look at it and tell what …

Member Avatar for jephthah
0
97
Member Avatar for manutd4life

hello everyone, i need to modify these code: [code=c]#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int numOfStars = 0; int count, counter; do { printf("N="); scanf ("%d",&numOfStars); for( ; counter<=numOfStars; counter++) { for( ;numOfStars>0; numOfStars--) { if (numOfStars != 9999) { for (count = 0;count < numOfStars; …

Member Avatar for abhimanipal
0
206
Member Avatar for mbw4359

Hi I've saw the following piece of code (it doesn't work in this form why?:-O): [CODE] #define CPU AMD #if (CPU == INTEL ) printf("Intel\n"); #elif (CPU == AMD ) printf("AMD\n"); #else printf("CPU isn't defined\n"); #endif [/CODE] Note I tried this on M$ complier & GNU gcc works the same

Member Avatar for Narue
0
36
Member Avatar for Th3one234

Hi Guys (and gals), Thanks for taking the time to read this, hope someone can help. I've been tasked with developing an anti-virus scanner as part of a university assignment. I've written all the signature matching code, which works fine, and the software can scan through a directory and find …

Member Avatar for Th3one234
0
110
Member Avatar for newbiecoder

Hello when Im trying to learn strncpy function, I copied a part of string to another char array, but it gave me different results when I used puts and printf functions. Can anyone tell me why such difference occurs? I guess its about the last terminating NULL character, but Im …

Member Avatar for newbiecoder
0
662
Member Avatar for Ni6tO_

I am trying to write a program in C with a main function and five other functions: input, output, calculate day of year for a calendar date, calculate calendar date from day of year and year, and determine if its a leap year function. I have a problem with calendar …

Member Avatar for Ni6tO_
0
162
Member Avatar for tcstom

Hi, I am attempting to create a dynamic array using realloc in 2 dimensions. Currently i have managed to get it to work using realloc to dynamically resize the amount of rows but when I attempt to use realloc to dynamically resize the amount of columns per row I keep …

Member Avatar for tcstom
0
4K
Member Avatar for tomtetlaw

how would i be able to open and read a .obj file(for a 3D model)? i need to extract the vertexes and their normals

Member Avatar for jephthah
0
151
Member Avatar for Griff0527

I am writing a code to open a command line, prompt for the name of a file to copy, prompt for a new file name, then it should copy the file (adding a header and line numbers plus adding .lis to the filename of the new file). I BELIEVE I …

Member Avatar for Griff0527
0
221
Member Avatar for tomtetlaw

how would i be able to seperate the text inside a file into the lines they are in? eg: [code] char *lines; lines = seperate_into_lines(a_file); /* not a function */ [/code]

Member Avatar for caut_baia
0
85
Member Avatar for BLUEC0RE

Hey guys and gals, I just wrapped up my first year of University CS and I feel like tackling my first personal project. My program will need to read in the mp3 title, artist, and album of many mp3 tags. My problem is that in class I only dealt with …

Member Avatar for BLUEC0RE
0
142
Member Avatar for busy

he below code works fine with dec c++ compiler but when run on visual studio gives the error at fseek[code]#include<stdlib.h> #include<stdio.h> #include<conio.h> int main() { FILE *fp; char *stringBuff; int i; int epi = 0; long lSize; fopen_s (&fp, "sequence.txt" , "rb" ); fseek (fp ,0 , SEEK_SET); lSize = …

Member Avatar for Salem
0
443
Member Avatar for xavier666

I've come across two questions from my previous years college test papers. I just couldn't solve them [LIST=1] [*][I]Define rational number as an ADT (abstract data structure)[/I] [*][I]Write a suitable C code to sort a finite set of elements where an element may appear a large number of times[/I] [/LIST] …

Member Avatar for Narue
0
142

The End.