15,551 Topics
| |
hi guys, i have this code [code] #include <stdio.h> #include <stdlib.h> int main(){ unsigned long long *x; x = (unsigned long long*)malloc(600851475143ULL*sizeof(unsigned long long)); if (x!=NULL){ printf("success\n"); getchar(); } else { printf("fail\n"); getchar(); } printf("%I64u\n",600851475143ULL); getchar(); return 0; } [/code] this is a part of some program im trying to … | |
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 … | |
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 … | |
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!! | |
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 … | |
[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]?? | |
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 … | |
[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! | |
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 … | |
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 … | |
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 & … | |
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 … | |
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, … | |
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. … | |
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 | |
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 … | |
can some one help me how to use gotoxy in making a program that all the sentence in center !!!! thanks !!!! | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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... … | |
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. | |
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 … | |
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: … | |
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 … | |
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 … |
The End.