15,551 Topics
| |
can anyone please tell me why following output is generated ... int i=10; printf(" %d ",i++/i); // output=0 i=10; printf("%d",i/++i); //output=1 i=10; printf("%d ",i++/++i); //output =0 i=10; printf("%d",++i/i); //output=1 | |
Recently, I was assigned a program that needs to be able to do the quadratic equation. I use this code [code] X = ((B*B) - 4*(A*C)); X1 = (sqrt(X)); X2 = 0-X1; X3 = X1/(2*A); X4 = X2/(2*A); Y = (-B + X3); Z = (-B - X3); Y1 = … | |
I have hard time understaning of what is Inheritance? Can someone help on this? | |
I am trying to prepare a database using C,which can store data and from which data can be retrieved and edited. [B]First storing,then retrieving data from the file works.But,during first run of the prog if choice#2(i.e.,DISPLAY)is entered without entering any data using choice#1(although the file contains data),then error occurs,gets hung.A … | |
I need to use the FFTW to generate fourier transforms. The "fftw-3.1.1 " has been installed already and it is in the location "/compiler/ fftw/fftw-3.1.1"..the "fftw3.h" is in this directory. In my program I have # included the exact path to the ".h" file. Still none of l the FFTW … | |
Hello I am trying to write data to a file. When writing "STEPHEN", only STEP is written, can anyone help? below is my code fp = fopen(filename, "rb+" ); fseek(fp, final_seek_pos, SEEK_SET ); fwrite(update_record, sizeof(update_record),1 ,fp ); fclose(fp); | |
Hey i am outta my wits to get the folowing output in C. Can ne1 help O/p reqd: * * * * * * * * * * * * * * * and so on. see th pyramid is not the desired one when you open this post.go back … | |
hi , need help in solving the flow shop scheduling problem using dynamic programming | |
What is the difference between “overloading” and “overridding”? This one of my interview questions? I am expecting answers for interview not for assignment any help? | |
Explination: Ever notice how the URLs of search engines and other sites are cluttered with % symbols and other numbers? This is known as URI encoding, which is simply % signs followed by nonalphanumeric characters that have been converted to their hexadecimal values Hi to all, I have the following … | |
I am starting a new project and a couple of tips would be helpful. I wish to read all the files in the Windows Favorites Folder or Directory and extract the link information. I know how to read the files once I have the name of the file. What I … | |
Could anyone tell me the function this program is using? [code]#include <iostream.h> #include <stdlib.h> void My_Name_Is() int main() { My_Name_Is() //Calls function that prints user's name }[/code] Thanks! | |
Hello I am trying to write some data to a certain position in a file, but cannot get it to work I want to write "XX" to position 6 of a specified file, but the data is just being written to the end of file. see below [code]#include<stdlib.h> main() { … | |
How can I separate an integer into digits using for loop? eg. before: 123 after: 1 2 3 anyone can help me with that? | |
Hi All, I am new member of this forum. I am trying to implement the simple c logic for the following problem : I want to come out of a [B]while[/B] loop only when I press the key 'e' But [B]condition is that, it should not wait for me to … | |
Hi All, When I build a solution, it follows error: fatal error LNK1136: invalid or corrupt file [I]If anybody can provide a key how to fix this, please reply[/I] | |
Hi, I have a program which is hard coded, I need to enter a value(n2 in the below code) in the program, and the program processes the file according to the value n2. how I compile now is as follows: cc -o test testprog.c ./test [filename] What I need to … | |
Hello all prorgammers out there. While just fiddling with the pointer concept of mine which is weak i wrote a very simple function to just give the addr of the array to the char type pointer so that i can refer the array using the pointer instead of the array … | |
I have xml strings in a memory in C program. I need to extract the reponse tag. Any known xml parser or string extractor code out there that works? | |
Hello, I need the logic to implement a stack by using two queues. can anybody help in this ? Thanks & regards, Kishore | |
<Post moved from dead [URL="http://www.daniweb.com/techtalkforums/thread22835.html"]thread[/URL]> is it possbile if the string letters can be alternatively capital? like uhmm ex. boring to a bOrInG? and without using the any str? | |
Here is the code i have written to accept string from the user. Can you please modify the code so as it can even count the space as well as print the whole line with the spaces instead of the first word. Thanks a lot. [CODE] #include <stdio.h> #include <assert.h> … | |
Hi, Can anyone please tell me where can I fing the C code for Base64 decoding. I have a string that is base64 encoded, and I have to decode it, how can I? Thanks, Neelu. | |
Hi! I'm trying to find out what is wrong with the next code which I'm trying to run in Linux: [code] int e1; int e2; pid_t pid1; // pid of child pid_t pid2; pid_t w1; // return code of wait() pid_t w2; // child process 1 pid1 = fork(); if … | |
Hello, ostream - how to insert a line of text instead of overwrite in the beginning of the file? #include <fstream.h> int main() { char fileName[] = "SampleFile"; char buffer[255]; ofstream m_fp; // m_fp.open(fileName, ofstream::ate ); m_fp.open(fileName, ios::in|ios::out); m_fp.seekp(0, ios::beg ); m_fp << "This is the line written to the … | |
I'm using Visual Studio .NET. The gui I'm implementing will be used on a wide screen. In the design view of the IDE, the form size is limited to the screen resolution. How can I stretch it to be the size of the wide screen so I can add controls … | |
This is a snippet from a larger block of code. The print statements are included for testing. Within 'main', if I ouput the 'cell_ptr' or 'params' pointers, it correctly returns pointer values but if I try to output an element from the params array, I get an '...illegal operation...' message. … | |
Is there a way to get adress of beginnig of my program in operative memory while it executing? | |
Hi, I've inherited some code in C that acts as a server and receives requests over a socket. That is all working fine. I wanted to make a very small change to the server code to print out the hostname of the client connection. However, I'm always getting 0.0.0.0 as … | |
I have the following simple piece of code: [code] double new_amount; printf("Enter an amount: "); scanf ("%d", &new_amount); [/code] For some reason, it always give me zero as the new_amount no matter what I input. What exactly am I doing wrong? Also, is there a way I can do a … |
The End.