15,551 Topics

Member Avatar for
Member Avatar for lecotti

Hello everybody, ive only been learning C for about a month so please forgive me if my code is messy or unclear! I have written a simple program which creates a text file, reads from it and then writes the output backwards to another file; it seems to work apart …

Member Avatar for BestJewSinceJC
0
104
Member Avatar for monkey_king

Hi, [LIST=1] [*]Question Why does valgrind complain? [CODE] Conditional jump or move depends on uninitialised value(s) ==25636== at 0x4C26D29: strlen (mc_replace_strmem.c:242) ==25636== by 0x40060A: main (test.c:7) [/CODE] [*]Question Strlen doesnt apparantly tell you how much space you have in your array, but the number of chars til '\0'. I my …

Member Avatar for fpmurphy
0
241
Member Avatar for alok1255

i have written a program to transfer character from one comp to another using serial port .in order to test the program i want to use loopback control as i have only one computer. i have read how to connect rs232 in loopback mode but my problem is that if …

Member Avatar for Colin Mac
0
158
Member Avatar for champnim

I am trying to communicate with my phone over a serial port by sending AT commands to it. While I'm able to write the command to it, I'm unable to read the reply. I am using overlapped I/O & using the WaitCommEvent to retrieve the result of the write command, …

Member Avatar for krishnampkkm
0
1K
Member Avatar for monkey_king

Hi I stumpled upon some c-code, which syntactically is different from what I've seen before. [LIST=1] [*]first [CODE=c] void strreverse(char* begin, char* end) { char aux; while(end>begin) aux=*end, *end--=*begin, *begin++=aux; } [/CODE] Would this be the same as [CODE=c] void strreverse(char* begin, char* end) { char aux; while(end>begin){ aux=*end; *end--=*begin; …

Member Avatar for monkey_king
0
213
Member Avatar for MrNoob

I m trying to find the biggest number in the array but problem is that it keeps returning one [code] #include <stdio.h> int FindBiggest(int *arr,int choice) { int i; int num=0; for(i=0;arr[i]<=sizeof arr;i++) { if(num<arr[i]) num=arr[i]; } return num; } int main(void) { int arr[]={0,5,3}; int result; result=FIND_NUM(arr,BIGGEST); printf("%d\n",result); getchar(); …

Member Avatar for jephthah
0
132
Member Avatar for seemant_sun
Member Avatar for jephthah
0
65
Member Avatar for Qisrem

Hello, I need some help if anyone has an idea. I'm working a memory management simulator trying to implement a mark & compact algorithm. To do that I need a function that can move/copy a block of memory from address A to address B. I tried using [CODE]memmove (dst, src, …

Member Avatar for Qisrem
0
84
Member Avatar for brbsmn00

Dear Guys, I am Simone from Rome. I have a problem. I need to write an algorithm for the encryption of data, and to implement it I need to work with integer numbers of about 100 ciphers (for example I need to make a multiplication between 2 numbers of 70 …

Member Avatar for jephthah
0
71
Member Avatar for losthope10

Could someone explain how to get to the answers. I read the book from class and cannot find the answers to the last 3 problems. I am not asking for the answers, just how to figure to resolve the problem. I appreciate the help. Consider the following selection statement where …

Member Avatar for bdvenom
0
139
Member Avatar for sarawilliam

I am constructing the control flow of the program. I am reading the bb.ls file and in that file I will search for ‘b’(branch instruction), if ‘b’ is found I create a newnode and store the node count and store the address of the next node( linked list). My doubt …

Member Avatar for ArkM
0
104
Member Avatar for Nad42

Hi im trying to get a sort function working in a program im writing, basically ive got an array of structures of [code=c] struct person { char name[20]; char address[20]; char address2[20]; char tphneno[12]; char email[30]; }; [/code] and i want a function to sort them alphabetically by name in …

Member Avatar for Nad42
0
146
Member Avatar for cesar7160
Member Avatar for cesar7160
0
106
Member Avatar for alsoumhi

Hi all , My question is that I want to know if possible I use C language dealing with windows such as I create a folder ,file, and show for example a pop up message says hi when windows starts to operate . I mean can I do these kind …

Member Avatar for Narue
0
107
Member Avatar for mysong

Programming in c and we must use Miracle c for this course. I had my USD * MXN working prior to adding a numbers only validation. Now the code works as I want it to except for the correct calculation. Any suggestions would be appreciated. [code] #include<stdio.h> #include<ctype.h> #include <math.h> …

Member Avatar for mysong
0
390
Member Avatar for venucpp

Hello all, I worte a structure and filled the data, then i need to send them on tcp socket. before that i need to send only few data and i need to split them into bytes and need to store them in other array. Here is the code below [code=c] …

Member Avatar for William Hemsworth
0
93
Member Avatar for cesar7160

I need to do a C program where user will be able to change the system time. I'm looking for this at some websites, but I can't find how to solve this. How do I change the system time using C on Linux? Any clue? 10x

Member Avatar for cesar7160
0
288
Member Avatar for headacheinC

Hi everyone, I get stuck with this homework. May be someone here can help me. I must combine two txt file, line by line. My first datafile contain 1 column, contain float numbers and the other contain many columns, also float numbers (Here i attached both the txt files). For …

Member Avatar for headacheinC
0
583
Member Avatar for Quessir

Hi, all. Have anyone ever implemented strings encrypting with libmcrypt? Especially, interested in MCRYPT_RIJNDAEL_256 with MCRYPT_OFB mode. Tried to implement following the example from docs, but always gaining segmentation fault. Seems to me, that i missed something with iv size and block buffer size. Would be happy, if somebody provide …

Member Avatar for Quessir
0
311
Member Avatar for newbiecoder

Hi, I want to write a code which takes an array of 20 characters and deletes all spaces between characters, it should leave only letters. For example: input :[B] d a n i w e b[/B] I want to make it :[B] daniweb[/B] I wrote this code, but it didn't …

Member Avatar for ArkM
0
114
Member Avatar for Beauti

Hello Once again I must seek help from those who know what it is that they are doing and I am not... Right now we are usng Visual Studio 2005 for VB and C++ and my visual studio is defaulting to C++ upon opening the program. How do I stop …

0
52
Member Avatar for Torso_Boi

Hi. I'm fairly new to programming, and I'm trying to make a rock paper scissors simulator (text based). One problem I have, however, is that my compiler repeatedly tells me that a 'void value not ignored as it ought to be' prevents me from running my program. Here's the snippet …

Member Avatar for Torso_Boi
0
92
Member Avatar for winrawr

alright, I did this without the help of documentation or help forums, I just sorta, figured it out on my own--and hacked together some code to make it work, and I'm super proud, so bare with me: I compiled a C DLL, which was loaded into a VB6 app. The …

Member Avatar for winrawr
0
133
Member Avatar for sdas7

Hi, i need to transfer binary data over socket and write the data to a file. Can anyone please help me out with this issue. I am using fread() to read the file and fwrite() to write the file,send() and recv() as the socket calls. I am able to transfer …

Member Avatar for William Hemsworth
0
1K
Member Avatar for IT_wannabe

Hi, I'm new here. I am an IT student in my third week of my first programming class learning the fundamentals such as algorithms, pseudocode, etc. I do not want to post my pseudocode in the forum because other students taking the same course may be able to cheat. The …

Member Avatar for Narue
0
120
Member Avatar for Sturm

C-programming, a that would want to help. I have a problem with the reference to a correct return of the key more words. Does the face make my compiler says that identificatore is not defined as the return of the multiple of the place of the connection, the one that …

Member Avatar for John A
-1
121
Member Avatar for yigster

Hi, I am having trouble whit writing a code for game of life.. This is what I came up with; [code] #include <stdio.h> #include <stdlib.h> void header(void); void survivalRule(char [][20], int, int); void birthRule(char [][20], int, int); void deathRule(char [][20], int, int); int main(void) { char Life[20][20]; int orgs, gens; …

Member Avatar for yigster
0
142
Member Avatar for jephthah

im going to risk getting a beating, because this is something i should (used to?) know... anyhoo, given a function, how do you tell the size of the array that is passed? obviously trying to find the sizeof the pointer doesn't work (it returns the size of the pointer, duh) …

Member Avatar for nalply
0
507
Member Avatar for sanushks

Hi All, Currently i'm using `sprintf` to copy from pointer variable to a character array. `sprintf(length,"%.*s",(int)len,part1);` where part1 is a pointer to a character array.. length is a characteter array too. Is there a way i can do the above thingy to copy the part1 to a integer variable? Thanks …

Member Avatar for sanushks
0
158
Member Avatar for kvprajapati
Member Avatar for kvprajapati
0
168

The End.