15,550 Topics

Member Avatar for
Member Avatar for Hiroshe

Warning, this post contains code for Euler problem 5. Try to solve it youself without looking at anyones code. Its alot more satisfying if you do it yourself. Hello, just found an interesting website called project euler. I managed to get to problem 5 without a too many problems. Anyways …

Member Avatar for iamthwee
0
111
Member Avatar for ps243

hi, I need help in my work. Let me give some idea of what I am trying to do. I have multithreaded C program, where I am suppose to take inputs from different files (a input file for each thread). Threads will execute based on these inputs. I am struggling …

Member Avatar for Ancient Dragon
0
98
Member Avatar for ganesh_bala

I need to use huge data (10^100) in a Variable in C? How can i implement it? Double,float ranges are low.. Suggest me in this.. Thanks in advance!!

Member Avatar for Hiroshe
0
140
Member Avatar for sam511

hello everybody,I'm a new member ,and i was hoping that you could help me with my problem . I'm making a secondary school system using linkedlist and files and i add students into two levels each one with a different linkedlist. we are suppose to add ,update,delete,search,display and then save …

Member Avatar for sam511
0
61
Member Avatar for ravikiran032

[code] # include <stdio.h> # include <conio.h> #define squ(x) x*x main( ) { float s=10,u=30,t=2,a; a=2*(s-u*t)/squ(t); printf(“result :%f”,a); } [/code] [B]output is -100.000 how is it possible[/B]??

Member Avatar for MosaicFuneral
-1
100
Member Avatar for Hiroshe

I'm trying to make a simple prime number generator for bigger program. It needs two numbers (n and c) and needs to edit them. So I decided to put the numbers in pointers, and just give the adress two the pointers. After about a half-houre of fumbling with *'s and …

Member Avatar for mvmalderen
0
151
Member Avatar for mvmalderen

[B][COLOR="Red"]First:[/COLOR][/B] I'm not asking how to do this, just carry on... Hey, I found a nice link on how to read C/C++ declarations: [B][URL="http://unixwiz.net/techtips/reading-cdecl.html"]http://unixwiz.net/techtips/reading-cdecl.html[/URL][/B] I'm leaving it here for anyone... I hope it will be useful to you!

Member Avatar for xyzt
0
95
Member Avatar for Cheesey

Hi All I am attempting to install a low level keyboard hook using the following calls: [code]HANDLE hDll = LoadLibrary(DLL_NAME); LPVOID procAddress = GetProcAddress(hDll, "HookProc"); HHOOK wHook; wHook = SetWindowsHookEx(WH_KEYBOARD_LL, procAddress, hDll, 0);[/code] I have built a DLL containing HookProc define below: [code]__declspec (dllexport) LRESULT CALLBACK HookProc (int nCode, WPARAM …

Member Avatar for Cheesey
0
290
Member Avatar for edenn1

i have an assignment: Write a recursive function that will compute the value of a representation of a number in given base. int base(char num[], int radix); For example, calling the function as base("1011", 2) should return 11, but calling it as base("1011", 10) should return 1011. i need to …

Member Avatar for s_sridhar
0
109
Member Avatar for srishekh

Respected Sir/Madam I need to find out the execution time of a fragment of code. For that I am using time_t structure, but it gives time in seconds. And the value of CLOCKS_PER_SEC in my comp is 1000000. Will you please me in getting the time in milliseconds Thanks & …

Member Avatar for WaltP
0
588
Member Avatar for niruyadla

Take 3X12 matrix and it is represented usingsingle diemensional array. input: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 Output: 24 25 …

Member Avatar for William Hemsworth
0
162
Member Avatar for patrick k

Hi everyone! I'm trying to learn C from my dad's old college textbooks, and I'm doing some of the problems he had to do. This problem is meant to calculate the number of days between two dates given by the user. I made a function to account for leap years, …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for yila

i got an exercise in which i've to write a code that does: when you enter the day of the month (f.e. 21th) and the day (f.e. Sunday) and the month (f.e. august) will display if in the given month there is a 13th Friday. so i made a prog. …

Member Avatar for yila
0
784
Member Avatar for Interrupt

Hi Folks I’m just starting to learn C, I’ve downloaded VisualC++2008 Express. Can someone walk me through creating a std C application/project in VisulC++ 2008 Express or just point me to some literature on this topic Thanks

Member Avatar for athlon32
0
86
Member Avatar for book_worm

Hello World! i want to write a program that generates 100 random numbers. the program should do the following tasks: ** store these 100 random numbers in a file called totalFile.txt ** read these numbers one by one from totalFile.txt and store the even numbers in a file called evenFile.txt …

Member Avatar for kangarooblood
0
360
Member Avatar for chin2x

can some one help me how to use gotoxy in making a program that all the sentence in center !!!! thanks !!!!

Member Avatar for twomers
0
204
Member Avatar for razsadeq

the following is a simple program that fragments standardized name consisting of 3 letters and 2 numbers then prints the full word, for instance spa11 print spanish eleven. Why is it not working? [code=c] char sname[4]; char snum[3]; // void strnumCpy(char *dest, char *source) { // NOT ACCURATE void strNumCpy(char …

Member Avatar for razsadeq
0
2K
Member Avatar for mysong

I am a beginner I have to write a code in straight "C" the code has to read from a file from c:\temp c:\temp\numbers.txt inside that txt file are the numbers 2 4 6 8 -3 20 30 40 60 80 100 200 It reads the txt in my code …

Member Avatar for Salem
0
2K
Member Avatar for edenn1

hi all! i need to write a recursive function that checks whether a given sentence is a palindrome by using this function: int isPalindrome(char word[]); i need to define a helper recursive function with extra parameters, and write isPalindrome as a wrapper function. the helper function is : int isPalindromeHelper(char …

Member Avatar for WaltP
0
103
Member Avatar for bharanidharanit

Hello I am having 3 files. a file contains text as aaaa,bbbb,cccc b file contains text as 1111,2222,3333 so i want to read these 2 files and write to new file as aaaa1111,bbbb2222,cccc3333. Can i able to do this?

Member Avatar for Ancient Dragon
0
124
Member Avatar for bharanidharanit

Hello, I want to read a text file in C and the output file must be created and want to reverse the data in tat output file created. So i used the below coding but not reversing the data in the output file created. eg: input file contains this data …

Member Avatar for Dave Sinkula
0
346
Member Avatar for kostasxx

Hi I use Dev - C++ and i d like to ask you cause i dont seem to figure that out, how can i store a 12 digit number? For example lets say this is the number 930342900243 How can i write a program that would print that number using …

Member Avatar for Dave Sinkula
0
128
Member Avatar for MrNoob

okay i understand all bitwise operators but in the chapter of k&r at bitwise operators i m really lost at there question i have no idea how to do them Exercise 2-6. Write a function setbits(x,p,n,y) that returns x with the n bits that begin at position p set to …

Member Avatar for Tom Gunn
0
372
Member Avatar for girl_pt

I want to read the contents of a .txt file and the contents, for example, are: 1;london;7000;2000;3000;5000; etc i want to read them to a variable linked by adjacency lists I need to know how to do this for a paper work and any help is welcome. thx in advance... …

Member Avatar for Dave Sinkula
0
102
Member Avatar for blackrobe

Hey there, I have a simple question: How can I read three characters by three characters from a string (character array) in C? Thanks for your help.

Member Avatar for s_sridhar
0
156
Member Avatar for sijithjp

hi plz help. Trying since 1 week. acwl1 line we james line rx sijith fff xw nisha nnn w /sijith line r /Arjun line w vineeth line r acls2 faculty x arrr line2 w Rahul line3 wx Arjun line1 m /Tom line wr ac01l2 lineN w aclM1 line1 rw Ram …

Member Avatar for WaltP
0
83
Member Avatar for athlon32

This is my code that I'm using: [code=C]void create_project_go() { FILE *fp; FILE *fopen("/usr/lib/htmlexamples/default.html", "r"); };[/code] and i get this error: [code]/home/miguel/Documents/packing/create_project.c||In function ‘create_project_go’:| /home/miguel/Documents/packing/create_project.c|40|error: expected declaration specifiers or ‘...’ before string constant| /home/miguel/Documents/packing/create_project.c|40|error: expected declaration specifiers or ‘...’ before string constant| /home/miguel/Documents/packing/create_project.c|39|warning: unused variable ‘fp’| /home/miguel/Documents/packing/create_project.c||In function ‘get_project_info’:| /home/miguel/Documents/packing/create_project.c|46|warning: …

Member Avatar for WaltP
0
227
Member Avatar for paroshm

Hi Folks I need to modify a .txt file using a C program. The file contains name and phone number of my friends like below: Mark 07915588623 Phill 07542535698 Claire 07825698745 ... ... . . ... If one of my friends phone number is changed (i.e. Claire 07985413791), how could …

Member Avatar for Narue
0
107
Member Avatar for jusmeehh

Write a program to compute the aritmetic mean (average), median, and mode for up to 50 test scores. The data are contained in a text file. The program will also print a histogram of the scores. The program should start with a function to read the data file and fill …

Member Avatar for jusmeehh
0
172
Member Avatar for seemant_sun

i have a thorough knowledge C and a little bit of practice of C but i wanted to be a good C programer can anybody tell me how i can do it are ther any good books which can provide me good practice of C

Member Avatar for jephthah
1
114

The End.