15,539 Topics

Member Avatar for
Member Avatar for mariosbikos

[CODE]int sin2(int g) { static int metritis1=1,i=0; int l,c,pin[100],pin2[100]; char result; srand ( time(NULL) ); l = rand() % 10; c = rand() % 10; c=65+c; l=l+1; pin[g]=c; pin2[g]=l; printf("%d and %d the g is %d\n",pin[g],pin2[g],g); while (1){ if (pin[i]==pin[g] && pin2[i]==pin2[g]){ printf("%c kai %d g is %d to i …

Member Avatar for mariosbikos
0
104
Member Avatar for Jaks_maths
Member Avatar for raghuram1987
0
332
Member Avatar for MWE_QUE

Thanks in advance for any help I can get. This is a que I need to add in to another program. It is almost straight out of the book, and a lot like my working stack implementation. It steps through correctly when I go line by line, but I'm not …

Member Avatar for nezachem
0
104
Member Avatar for antra1234

char *default message[]="hghgghjgh" char *message=defaultmessage tis line showing error as 'initializing':cannot convert from 'const char[ 9] to 'char *[]' can u help me....?

Member Avatar for abhimanipal
0
112
Member Avatar for bobyx

Hi.I write a program in C for my microcontroller(PIC 18F452) but faced to a problem that related only to C language and that is; as you can see in my Main program and the two Functions I want to pass an array of ; " int adcvalmax[8] " which got …

Member Avatar for Iam3R
0
187
Member Avatar for ankur.verma

Hi , I am preparing a project in C using mouse handling. I have no idea as to how input(text) taken by user in a graphics mode. Kindly help

Member Avatar for Ancient Dragon
0
46
Member Avatar for Iam3R

Hi, i have written a program to find the power of two numbers using iteration. The problem here is that to return the correct out put for even powers but not for odd powers. b = base , e = expo ,p= power( b, e);; for even powers the statements …

Member Avatar for Iam3R
0
94
Member Avatar for koupas

[CODE]#include <stdio.h> #include <stdlib.h> typedef struct { int finalMark; /* Ï ãåíéêüò âáèìüò ãéá çï ìÜèçìá */ }StudentType; struct var { StudentType *aStudent; char onomaa[20]; char eponimoa[20]; }; typedef struct var newtype; newtype a; main() { int bathmos; char onoma[20]; scanf("%s",&onoma); strcpy(a.onomaa,onoma); printf("%s",a.onomaa); system("pause"); scanf("%d",bathmos); strcpy(a.aStudent->finalMark,bathmos); printf("%d",a.aStudent->finalMark); system("pause"); }[/CODE] this …

Member Avatar for abhimanipal
0
7K
Member Avatar for kavi_90

I have to write a program where the producer gets the some number of inputs from the user and the consumer takes from the shared memory and prints their squares.In my program i have the shared memory size as 5. my program works perfectly in the area that producer and …

Member Avatar for abhimanipal
0
201
Member Avatar for nick.falconer

I'm writing a program of Conway's Game of Life. I think I've figured out most of it but there something wrong with the rules I've set up [CODE=c]for(row=0;row<20;row++) { for(col=0;col<21;col++) { n=0; if (a[row][col]=='*') { if(a[row-1][col-1]=='*') { n++; } if(a[row-1][col]=='*') { n++; } if(a[row-1][col+1]=='*') { n++; } if(a[row][col-1]=='*') { n++; …

Member Avatar for nick.falconer
0
100
Member Avatar for asm2hex

Hello, As of right now I'm in a hard spot. You see at this moment, I've been programming both my client and server. And everything was working very well, until I realized something. The fact that in my client I have multiple threads running and sending data to my server …

Member Avatar for gerard4143
0
78
Member Avatar for chunalt787

I didn't know where to put this but this seemed to be the best place. I took an internship this summer and found out that I will be doing embedded development in C/C++ and Linux for phones(land line voip stuff). This is bad for me since I have always been …

Member Avatar for chunalt787
0
130
Member Avatar for tquiva

I am trying to create a program that reads a data file and computes the water usage for each hour of the day, the average hourly usage for the day, and the time of the highest hourly usage. I already created the main program, and two other functions, along with …

Member Avatar for Adak
0
160
Member Avatar for Joey_Brown

Hello. I would very much appreciate if someone would aid me with a hint. My problem is as follows : read two arrays of chars and merge them into a third array like so : ARR1 :123abc ARR2: rt678iogl ARR3:1r2t36a7b8ciogl The problem must be solved without pointers and string.h Basically …

Member Avatar for Adak
0
380
Member Avatar for Iam3R

Hi, [CODE] #include<stdio.h> int main( void ) { float a = 0.2; if( a > 0.2 ) printf( "\n a is greater than 0.2" ); else if( a < 0.2 ) printf( "\n a is less than 0.2" ); else printf( "\n a is equal to 0.2" ); return 0; …

Member Avatar for Banfa
0
97
Member Avatar for magicg

Hi I want c language code to open my web browser (IE or Firefox) and close it after 2 min. can any one help me?? please i need it.

Member Avatar for Software guy
0
141
Member Avatar for gerard4143

I have a question, well more of a verification. In the program below, I'm packing a character array with some values. The first two are unsigned integers the next is a function pointer and the final is a string of characters...Now my question, is the casting correct for the function …

Member Avatar for gerard4143
1
170
Member Avatar for lionaneesh

[CODE] /* ** showip.c -- show IP addresses for a host given on the command line */ #include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <arpa/inet.h> int main(int argc, char *argv[]) { struct addrinfo hints, *res, *p; int status; char ipstr[INET6_ADDRSTRLEN]; if (argc != 2) { fprintf(stderr,"usage: …

Member Avatar for jephthah
0
167
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
155
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
253
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
209
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
502
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
148
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
485
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
257
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
108
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
151
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
127

The End.