15,551 Topics
| |
Hi guys, I would like to add a char to the end of a char* So imagine the following: char* test = "ABC" I want to add D to the end of it to get test == "ABCD" for the sake of argument, I can not use strcat as I … | |
Hi, Im trying to make a caesar cipher, but a windows error comes up when running. Where have I gone wrong?? Sam [CODE]///////////////////////////////////////////////// /// /// /// NAME: SAM BERWICK /// /// DATE: 18/11/2010 /// /// PROJECT: CAESAR CIPHER /// /// /// //////////////////////////////////////////////// #include <stdio.h> /// Stand In/Output #include <string.h> /// … | |
I want to make a button in a root window.My question is should i draw it or shoud i make a new window in my root window? | |
So basically it involves sodding scanf(). [CODE]int NumericalAnswer; int score = 0; main() { printf("Question 1: What's 4 x 3?\n"); scanf("%d\n", &NumericalAnswer); if (NumericalAnswer == 12){ printf("You got it right!"); score += 1; } }[/CODE] Output [ICODE]Question 1: What's 4 x 3? 12 9 You got it right![/ICODE] As you … | |
Hello, I´ve got a question about multiplexing 7 segment displays. I already have working 1 7 segment display. How can I control more 7 segment displays? Now only the 3th display can be controlled. This is the code I've made: #include <avr/io.h> #include <util/delay.h> #define F_CPU void delay_ms(uint16_t); void digit … | |
I wrote a short piece of code to give me a .dat file for use in another program. But i cant figure out what is wrong. I run on a mac, and use Xcode. [CODE]#include <stdio.h> #define ARRAYSIZE 1500 #define BINDATA "file://localhost/Users/Hub/Desktop/231A4binData.dat" int main (void) { int i; double dblData[ARRAYSIZE]; … | |
| |
Hi, Can anyone explain in detail what is the difference between int *a and int* a? Is there any difference between them? | |
| |
Hello, I have a program that is like a ftp server - it sends and receives files over unix sockets. It works fine when I transfer text files, but as soon as I want to receive binary files, it's not working properly. Files are transferred correctly, I can verify that … | |
Hi what methods of encryption could I use to encrypt a text document. It must use C and not C++. Cheers Sam | |
i know there is probably a trick for this in C that i do not know, but i attempted to write my own function for finding the mode of an array of data (As large as 1500 doubles). Heres my crack at it. [CODE]void mode (double * array, int numItems) … | |
i need help with the 5th case in the submenu! Several 2-dimensional geometric shapes, area, and a program for environmental accounts are required to be made. To do this, first run the program in a main menu displayed on the screen as follows: MAIN MENU 1. Area Calculation 2. Perimeter … | |
Hello, I´ve got a question about multiplexing 7 segment displays. I already have working 1 7 segment display. How can I control more 7 segment displays? Now only the 3th display can be controlled. This is the code I've made: #include <avr/io.h> #include <util/delay.h> #define F_CPU void delay_ms(uint16_t); void digit … | |
On this link [url]http://lxr.ncu.cc/source/kernel/timer.c#094[/url] a return type is defined [CODE] return ((unsigned int)(unsigned long)base & TBASE_DEFERRABLE_FLAG); [/CODE] What is the above function returning.I am not clear with definition of what is being returned in the above code. | |
Write a 'C' Function to combine two singly connected linked lists in the following manner. Suppose one list is "L" which can be given by L=(l0,l1,.....,lm) and the other list is "M" where "M" can be expressed as M=(m0,m1,......,mn) where each li,mi represents one node in the respective lists. For … | |
Hi All, Can somebody explain what is the difference between (char*) and (char**). I am just looking for an explanation of in byte level. Also please refer any documents related to this. Thanks | |
| im a first year engg student. i need 2 make a report on cryptography and i need the source code in C for caeser cipher. as it so happens im not very good at c programming... please help can u tell me wats wrong wid this program? #include <stdio.h> void … |
so i just started this programming class in school today, im having alot of trouble, i dont want everyone to do the work for me, but i would love for you guys to tell me what needs to be done, i know this is alot to ask so if anyone … | |
Hi, I would like to make an threaded app which would use pthreads. I made a linked list and I put references to running threads here. I know that operations of adding a new thread reference to the list and removing a thread reference from the list after the thread … | |
Hello, I want to redirect stdin and stdout of "cat" program to my program. For example if I type "cat" in terminal, and enter input and press enter it outputs the same string I entered. In my c program I am trying to use pipes and dup. I cannot figure … | |
Hello all, I have this code: [code=c] void SetMatrixRange(MyMatrix * matrix, int xfirst, int xlast, int yfirst, int ylast, int zfirst, int zlast, int value) { int i,j,k; for(i=xfirst;i<=xlast;i++) for(j=yfirst;j<=ylast;j++) for(k=zfirst;k<=zlast;k++) matrix->m[(i*ylast*zlast)+(j*zlast)+k]=value; } [/code] I allocated the matrix like this: [code=c] MyMatrix * CreateMyMatrix(int x, int y, int z) { … | |
Hi! i trying to take the same value from 2 arrays and then count how many time of it. However, when i compile, it run ok. but it did not print out the value of coutting. I did not know why, i had tried several times to fixing. please help … | |
hi everyone, i'm trying to do a program in c, GCC UNIX and i have this error: warning: passing argument 2 of `write` makes pointer from integer without a cast i try to use TUBE, communication between process and i use `write(fd[1],2,1);` but it gives this error please i nead … | |
I absolutely hate hate hate hate HATE to be doing this, because I've figured out every other program I've done relatively alone with my C Book. I'm writing a program that declares an array of structs, each with a name and age field. The data is read from a file … | |
The program I am writing is supposed to read in a txt file and then align the txt depending on the number of characters per line that the user has specified. Since there aren't any limitations to the length of the text it has to be represented using a dynamic … | |
| Dear all, Im trying to do a matrix multiplication with complex number. I have 2 structures: [code=c] /* Structures */ typedef struct complex { // Complex structure = real and imaginary part. double re; double im; } Complex; typedef struct complex_matrix { int rows; int cols; Complex **mat; } Complex_Matrix; … |
Hi all, I am trying to read a file in C. The format of file is something like that : ----------------------------- <From: [email]sender@hotmail.com[/email]> Hellooooooooo. </from> <From: [email]george@gmail.com[/email]> What am I doing? nOwwwwwwwwwwwwww </from> ---------------------------- I would like to read the file and extract some info like number of emails , … | |
Hello, I'm working on an inventory program in c and having a lot of trouble with it. I've compared my code to several examples in the book and it seems right but I'm having these problems: 1. When I try to list the tools, the program ignores the command and … |
The End.