15,551 Topics
| |
Hi , i want to use hash tables in my project. i got few codes in that i got some function called hash() [CODE] int hash(char *s) { int h =0; for (; *s;s++) h = *s + h * 31; return h % 101; } [/CODE] i understand the … | |
i need a complete working program in TRIE data structure. the program should insert words into trie and also search it when asked. please help me out. at least post the links where i can find them. thank you. | |
hi there. i have 6 long numbers in a text file that i am reading from. these numbers can be of any length but written in the one of the formats as i have written below. the numbers are 102,2131,432 //format 1 32,531 //format1 74 //format2 534532.5 //format3 1,500 //format1 … | |
Hi I want to print in the screen only [B]the fields [/B]of some of the data that is in the structure, Doom3 like: the name for example, or the field time in FIFA, or the field memory in word How can i do this ? [CODE] #include <conio.h> #include <stdio.h> … | |
I posted this in the computer and science forum, and i believe it should be here, and with no one saying anything I am afraid I posted in the wrong place so here goes again. I am having issues with an assignment, I am lost as how to do a … | |
i run the below code and surprised to see the o/p . take a look and let me know whats happenning there. [CODE]#define print(x) printf(#x"=%d\n",x) int main(){ int a[10]; print(a); print(*a); print(*a+1); print(*a+3); print(*a+1-*a+3); return 0; } [/CODE] Out Put: [QUOTE] [Zonnie@telnet CPz]$gcc funny.c [Zonnie@telnet CPz]$ ./a.out a=-1073745776 *a=1 *a+1=2 … | |
Heya folks. I'm trying to write a BMI calculator, but I'm missing something. Splint tells me I have a parse error before the scanf, but I'm not seeing it. Also, I'm struggling to get the BMI to print (I'm pretty sure the two are related). It worked (before I put … | |
hey all, im new to this programing stuff consider a buffer of size 2048bytes. the data i need to send is more than 2048 bytesof the of buffer. i have a func SendDataReq (u8* pu8_TxBuffPtr,u16 u16_NoBytes);. how do i send this data using this func | |
hi all, can u write me a sample code to receive the data when sender sends the data throu fun senddata(u8* pbuffer, u16 bufferlen);.. its should store in a recieve buffer and should return the length of the data received. | |
hi, im getting recv:bad address error in the server code when im receiving the data from the client.i tried passing the structure and an integer alone ,but for both i got the same error. for structures: client: [code=c++] struct Data { char data1[255]; char data2[255]; int val1; }; struct Data … | |
i have been trying to compile for a while now worked fine until i added a symbolic constant then i get all kinds of syntax errors please help thanks heres source code: [CODE]#include <stdio.h> #include <stdlib.h> //GIGO.c- Coded by Ross Camarillo aka Bubonic_88 // on 12/02/2009 //Created by Randy Gibson … | |
hi , anybody would help me how to print prime factors in c using recursive function | |
I am new to XML and have a very sketchy knowledge of C. I am writing a C program in which I need to read strings (each on a separate line) in a text file, match that string with a value enclosed in a specific tag inside an XML file, … | |
patter like n=2 [CODE] * * * * * * * * * * * * * * * * [/CODE] pls help me in solve this program | |
Write an if/else statement that compares the value of the variables soldYesterday and soldToday , and based upon that comparison assigns salesTrend the value -1 ( soldYesterday greater than soldToday ) or 1 . i wrote: [code] if (soldYesterday > soldToday) { salesTrend = -1||0; } [/code] and its coming … | |
Hello, I need help with re-ordering the values in ascending order in the array (Unordered). However, I cannot use swap or sort function (i.e. Bubblesort). How can I do that? | |
Hello im having a problem with my program. Im trying to read in two files called list.txt and teachers.txt and set them to an array called studentList[] and teacherList[] but i dont know how to do that, any suggestions? I know i have to use a for loop but i … | |
Hello! I had a question about appending data in to a file. My program flows in the following way-- [CODE] // This function reads data from the file parse_input_data_for_one_algo(some parameters) { FILE *f = fopen (filename, "rw+"); while ( fgets (in_line, 100, f) != NULL ) { //read values } … | |
I officially have the worst C professor in the world. The guy hasn't answered my email in weeks and I don't have a class meeting before this assignment is due, so I have come here for some help. If anyone could point me in the right direction any part of … | |
Hi! I'm new here. I was just wondering if there's someone who could help me in solving this problem. Given a sequence of n numbers, compute the running average of the sequence. For example, given the sequence 1 3 5 7 9 will produce the output: 1 1 3 2 … | |
hi guys, i'm new in c++ programming in this forum too, seen many helpful threads so far, but i just can't get over this one, something wrong with my return value , it says so "total" is undeclared identifier (line 46), but when i declare it in main function as … | |
Is there a way to split a string every 30 characters and store them in smaller strings without looking for a token? | |
Hello everyone, I'm new here. I was working on a homework problem for a basic intro to C class and I'm getting a syntax error for an if statement and I have no idea why it's popping up. [code] #include <stdio.h> // Function Declarations int Sum (int x); float Average … | |
I need to scan a crossword king of thing like this: [CODE]a b c o d e f g h i j k l m l n o p q r s t r z a l q w s x c d e r f v e b g … | |
/*i know how to convert but i dont know how, if its a larger no. ex. thousands??? because it has no restriction in nos.,,what can i use?*/ | |
can we save the objects , we draw using C, to a file,in the same way we used to save text to a file?Plz help me with an example, of how to save such drawings to a file and load it later.?THANKS..... | |
The Programming languages started with the low level language( 1's and zero's , so no conversion is needed. Assembly language is used mnemonics ( ADD,INC,DEC) so needs conversions as the machine cannot understand it directly. there comes the Assembler. Now the question is how the Assember was implemented, i mean … | |
Hello, There seems to be a multitude of different unit testing frameworks for C and I'm having difficulty in choosing which one to use. (I have no experience with C development at all) Is [URL="http://cunit.sourceforge.net/"]CUnit[/URL] generally the well known and widely used framework as NUnit is for .net and JUnit … | |
My prob' is that when I type 'Amanda' when the program asks for my name, it returns Hi. I want it to return Howdy when I input 'Amanda', and hello for all other strings. This is my program: [CODE]#include <stdio.h> int main() { int nothing; char namn[20]; printf("What's your name?\n"); … | |
hi, I use a software called HD-speed to test the speed of my USB hard dirve. when I test the write speed, it destroy the data in my hard dirve. can I restore my data back? I find that the method used by HD_Speed to read/write is the following Win32 … |
The End.