15,551 Topics
| |
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 … | |
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 … | |
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 … | |
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, … | |
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; … | |
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(); … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
I can send correctly, but I can't read. Can you give me any code, ideas, and links. Thanks | |
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 … | |
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> … | |
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] … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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) … | |
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 … | |
I have difficulties to implement variable length argument to my C function. |
The End.