15,540 Topics
| |
Please can anyone help me to get the time zone between GMT & New York including the daylight saving. I am able to get the timezone between GMT & localtime including the daylight saving. My program goes like this [code=c] time_t t = time(0); struct tm* data; data = localtime(&t); … | |
Hello, I'm trying to read in a txt file that looks like: AAAA BBBB 1234 CCCC DDDD 4321 .... and here's what I've done so far: [code] char a[4]; char b[4]; int c; FILE *input= fopen("input.txt", "r+"); if (input==NULL) perror ("Error opening file"); else{ while(feof(input)== 0){ fscanf(input,"%4s",a); fscanf(input,"%4s",b); fscanf(input,"%d",&c); } … | |
Hey friends , Is there any way to change textcolor in C? I am not able to find any method... | |
[B]Here it goes: 1. Write a C program to calculate the value of x for the given formula of quadratic equation. 2. Write a C program to calculate the petroleum consumption. It should assign the distance travelled in km. and the amount of petroleum used in litres and compute the … | |
Hi, Would really appreciate if someone can help me. Need to generate 10 random numbers such that their sum is less than 1. thanks so much in advance manu | |
:!: [U][COLOR=#000000]Minimum-weight Path.[/COLOR][/U] [COLOR=#000000] [/COLOR] [COLOR=#000000]An agent is required to move from the top row to the bottom row of a m × n grid, (i.e. from start position (0,j) 0<=j<n to end position (m - 1,j) 0<=j<n). On each move, the agent may only take one step rightward, diagonally … | |
Hi guys, just wondering, how would i go about joining numbers together to form one integer.. example.. number 70 54 34 would end up being 705434.. thank u for your ideas... | |
My header file time.h is being corrupted.. I can't find it on the internet... Can anyone please give me the link to the file or just copy and paste it to the reply of my paste... | |
OK, this is the problem: my original file has only one line and that line contains a sentence. I'm supposed to create a new file that will put each word from the sentence in its own line. For example, original file: [code=c]The quick fox jumped over the lazy dog[/code] output … | |
Hello everyone ... : ) i'm studying data structure and i'm trying to collect all the point in this course . what I have now is a question about sorting . I want to learn how can I do it and code it in the right way .. [quote] The … | |
I want to read a file which contains a list of integers. The first 4 bytes( or whatever sizeof(int) is ) indicates how many numbers the file has. Suppose I check the file size before reading so that I know I won't encounter EOF. Do I still need to check … | |
im trying to read a file has many lines but after reading it every time i tried to printf it, but it always print just the last line???/ f = fopen("text.txt","r"[IMG]http://www.free2code.net/plugins/forums/images/smilies/icon_wink.gif[/IMG]; if(!f) return 1; while(fgets(s,1000,f) != NULL) sprintf(value,s); fclose(f); printf("%s",value); [URL="http://www.free2code.net/plugins/forums/reply.php?f=3&p=48130&q=48130"] [/URL] | |
Hi... I'm trying to get a few people to try out a new C unit tester called Cgreen. It's published on Sourceforge at [URL]http://sourceforge.net/projects/cgreen/[/URL] and at [URL]http://www.lastcraft.com/cgreen.php[/URL]. basically I'm after feedback before pushing for a stable release. It's currently a late alpha. Besides the usual X-unit features (setup/teardown, composite suites), … | |
Hi All,As usual. I am a silent member until I have passed my exam. Recently, I passed my exam with 95% for 1Z0-042. Meaning 95% of the questions are from certmagic.com guide. There a few new questions, which I am not familiar with. These questions would be remaining 5% of … | |
hello my name is asif i want simple c program of transpose of matrix plz help me | |
Hi guys, This exercise goes as follows: - Write a function that counts the number of occurences of a pair of letters in a string and another that does the same in a zero-terminated array of char(a C-style string). For example, the pair "ab" appears twice in "xabaacbaxabb". Now, I … | |
Here's an example of two programs that do the same thing, I have been taught how to do them like the first way. Now, I'm reading an ebook and it explains to do them like the second way. Which way do you think is more proper? thanks [code]#include <stdio.h> int … | |
Hi Everyone! I am supposed to be writting a program that will run from the web. I created a short program to see if I could use linux by uploading the file to my public_html and then using putty to change it to a .cgi file but nothing is working. … | |
Ok, i am just starting out in C. This isn't my first programming language, though(i don't mean to brag, but i am a BASIC master), so i know quite a bit about computer architecture, and all that good stuff. The project i am designing is a robot with stereo vision. … | |
[COLOR=#000000]in language C [/COLOR] [COLOR=#000000]Code that examine if the tree is full[/COLOR] [COLOR=#000000]Tree is full if each node have 2 child[/COLOR] [COLOR=#000000]i dont know how to write the code ?[/COLOR] [COLOR=#000000]somebody can help me ?[/COLOR] | |
Having trouble where to go next on this program: 1. If n is even, then you may give back exactly n/2 bears. 2. If n is divisible by 3 or 4, then you may multiply the last two digits of n and give back this many bears. By the way, … | |
Hi All, Thanks for all your help and advise. Here is a code for printing sales record. I don't understand what is the error in this code. When I try to complie and run, it says it cannot open the "sper.dat" file. Please help. Here is the 2 input files … | |
| |
hi, I wanted to know if I can pass functions with varying no. of arguments to a fn pointer. say for example, i define a fn pointer as void (*fptr)(const void* , const void*); If there are another pair of fucntions defined as : void f1(int*, int* ); void f2(int*, … | |
how can i get a program to include other cpp files?? like if i was on a tem for school and we spilt the work into smaall parts ca we just use ome kind of include function to put all the files together withotu copy-pasting:???? | |
Well the program takes a string of text and then turns it into title case (first letter or every word is capitalized). So I got it working as you see, the problem is I need to write a seperate function that can simply accept the string to be converted as … | |
Hi guys, need ur help regarding the above matter. I've write a code for if statement but it didnt work as expected when I run the program. Below is my code: [code] // Get ChannelID strcpy(src, row[11]); if (strcmp (src, "1") == 0) { if (sprintf(query2, "select * from Register … | |
Anyone have any ideas on how to simulate an I/O device such as an MP3 player serially? | |
I need to use RNG to create a sentence, I know how to use a RNG to create numbers from 0-x but im not sure on how to use it to create sentences. Is there a way to assign random numbers to characters and store them into an array to … | |
Just what I need. In the midst of the two busiest weeks of the semester, and I get a friggin run-time error. I am running 64-bit Debian etch, and running the program from a terminal. It gets to some perfectly good code (I've said that before, and I was wrong), … |
The End.