15,552 Topics
| |
| |
[CODE=c]#include <stdio.h> #include <string.h> #include <stdlib.h> #define TRUE 1 #define FALSE 0 void Result (char *result, char string, char remove); char *RemoveChars( char *src , char *key ); int main(void) { char string[] = "Alesia"; char remove[] = "aeiou"; char result; Result (&result, string, remove); fflush(stdin); printf(" Press any key … | |
I need a better solution to a while loop that continualy checks the current time against the time that the user would like the program to end. This loop spikes the processor usage to 100%. [CODE]while( time(NULL) <= endTime ) { printf("\r%4d", endTime - time(NULL)); }[/CODE] Thanks in advance. | |
i have a online logging of data through com port. the c program captures the online data every 1 minute, calculates ten minute average, standard deviation and then writes it to a file. the file is created with getdate function. when the day changes, i have to create the new … | |
this is coming off a program that collects information and saves it after every command. I have opened my file successfully cause thats how it reads the client. the problem is saving the data. Does this code look right to everybody??? I am running in C and very very basic. … | |
I am developing i a c-editor which can run graphics on VISTA and can use minimum system RAM and processes. I need C help file database wich can be linked to my software | |
I thought I was finished with this program but now I can’t find a way to make it quit. The loop continues even when I enter the terminating character. I’ll post he whole thing. The answer may be simple but I'm just not seeing it. [code] do{ do{ system("cls"); printf("Enter … | |
Hi I have a cgi controller that takes requests and depending on request it invokes the object of the desired class which generates a XML and sends the XML as a response. On the client this XML is combined with XSL to display a HTML page. For ex. [CODE] request---->controller------->router.cgi(a … | |
In file "sudoku.dat" is 9x9 size matrix. In one 3x3 bloc, can be from 2 up to 6 unknew digits, however main unknow digits amount in all matrix, must be not over 36 digits. Unknow places marked with symbol ? Example (3x3) ?9? 4?? ?32 I need program which could … | |
I'm trying to write a short bit of C code that will get a filename from the user, via the keyboard, and open the specified file, but I haven't been able to get fopen() to recognize the variable filename when I use fgets() to get it. Here's a snippet of … | |
hi guys im trying to code patricia trie in c using gcc and when i debuged the program im gettin segmentation stack problem in search function of it.im not sure why it is showing and i've included pat.c,pat.h and ncspatricia.h files. i also want to know what is the difference … | |
Hi Guys, First post here, so be gentle :-) I was going looking for an implementation of memcmp(), I found this code snippet, but it is clearly marked that there is 1 logical error with the code snippet. Could you help me find the logical error. Basically, I tested this … | |
The definition of library function strspn is: [CODE]size_t strspn(const char *str, const char *chars) /*Return number of leading characters at the beginning of the string str which are all members of string chars.*/[/CODE] e.g. if ‘str’ is “fecxdy” and ‘chars’ is “abcdef” then the function would return 3, since ‘f’, … | |
please help me.. am using turbo c 3.00 i'm gettin a compile time error : Lvalue required. ------------------------------------------------------------- [code] #include<stdio.h> #include<conio.h> #include<stdlib.h> int func(int x,int y) { int *ptr1=&x,*ptr2=&y; int **ptr_1,**ptr_2; *ptr_1=ptr1; *ptr_2=ptr2; printf("\nUsing function pointer : "); printf("\nx=%d\ny=%d",**ptr_1,**ptr_2); int sum=*ptr1+*ptr2; return sum; } main() { int *fnptr(int,int); // declare … | |
can any one help, need a program to search a particular word in a file (its a .dat file ) then count the number of it occurrences in the whole file, output the count on console. I have not worked with programs before.......... | |
I would very much appreciate any advice on this. I am reading a single byte from the serial port and wanting to store up to a hundred of these. Essentially I need to check incoming data to see if the value of it has been sent previously. These are my … | |
Hi all, I am in need of some assistance with addresses & pointers as my dysfunctional professor is of no help. (I'll be as succinct as possible.) First, the program must call three subroutines from main to fill "n" array elements with a given value; for instance, one must set … | |
I want a user to be able to select an audio file to play but am unable to figure out how to create a file open dialog box in Win32 API. I could create one from scratch but am hoping that there is an easier way than manually creating it. … | |
I have a client /server file operation program.It works properly when i run the client and server program in the same system.but when i try to run the client in one system and server in another system i am getting an error in the cleint machine as "ERROR:Connection refused". Plz … | |
Hi, I'm using GNU MP to get very precise square roots of numbers. I have three questions about my code below. [Code] #include <stdio.h> #include <stdlib.h> #include <gmp.h> int main(int argc, char *argv[]) { mpf_t num, sqrt; FILE *out; mpf_init2(num, 1000000); mpf_init2(sqrt, 1000000); printf("Enter a number to get its square … | |
[code=language] #include <string.h> #include <stdlib.h> #include <stdio.h> /* uni() function takes an array an thier size.and it produce an array which is include unique element */ int uni(char **arr,int size) { int unique = 0; /* The length of dst after removing duplicates */ int n=size; char *dst[n]; /* The … | |
Sairam Hai everyone,I just want to know : 1. what is full form of asm 2.what is the equivalent C code supported by gcc.running on SUSE Linux platform. asm PUSH;CLI asm POPF | |
I'm trying to determine if the characters in the maze can escape, the characters are labeled by their initials except for D which is the door here is the input data: 11 13 7 10 XXXXXXXXXXXXX X JX AX X XXXX XXXXBX X X X SX X X X XXXX … | |
Hi, i need to school some C code. Requirements are: Use in code some Functions with parameters, pointers, strucutres and global and private variables. Dont you have some code for it? I havent time to do it. Thank You very much. | |
Hi, Am anuj joined community today itsel.I have written a code which generates alpha numeric charaters and stores it in(file1).Then read the generated stuff 4 characters in file(by reading from file1)and appending "-" after 4 characters until "$" is encountered.I am getting an extra "-" in the file please tell … | |
I am modifying the WDK "genprint" Print Processor example. Everything is working great, and I can compile fine, but I am running into a snag with one thing. Part of my modification knowingly triggers a print error, and Windows re-submits the print job automatically in the spool. I need to … | |
Long story short, writing a multithreaded honey pot, and am having issues starting the honey pot servers. I'll get straight to the code, then explain the issue: Structure defs: [code=c] typedef struct __GENERIC{ int sock; char buff[MAXBUFF]; char ip[17]; int status; int port; int max_conns; // dMaxClients (Master = max … | |
Hi everyone,this program prompts a user for a leap yr code and a day code resulting in an entire year's calendar.The result displays months one below another.Can some one tell me how to make it print 2 months next to each other,that is JAN FEB then MAR APRIL below them. … | |
I am begginer in C so please be easy on me.....:-) Anyways....my query is I have a server and a Client program written in C(attached below) for test in UNIX/LINUX in which the client sends a request to the server and the server then sends back the request to the … | |
Hey guys below is my full code of the program I am trying to run. I want to save the data automatically. It goes through many areas but the save area is not working for some reason. Errr...I have spent many hours and it is very basic code probably because … |
The End.