I would advise you to make do { } while() ; loop (ie, bottom tested loop) . Because at least once you want the user to input the data. Otherwise you will have to initialize the variable to enter the loop.
For e.g,
do {
puts("Enter sqaure value 1-3\n");
scanf("%d"...
This is a typical problem in bank where the records from trasaction file is compared with master files . If your file is too large. Sort the second file first . Then pick one word from first file and make a binary search on the second file. This is the best way to do it in my opinion...
c1,
There is something called Pro*C . You write your logic in C and whereever you want to access the Oracle database . You need to put your SQL Commands. After that you need to pass this file to a proc.mk (make file provided by Oracle for that system). It will generate a proper C file ...
Why do you need int ***array. You can do with **array for 2-D array. Also , if you have already passed the array which has been allocated sufficient memory . Then the function of gerald will do . But if you need to allocate memory inside the function itself . Then just modify the function as...
The answer you will get in any good data structure and algorithm book as Multiplication of Polynomials using Linked list. Because it becomes a polynomial if you use integers bigger than the int data type's capacity.
Thanks
Siddhartha Singh <p>Siddhartha Singh<br><a...
Hi ,
rbobbitt you were right for the first time .
The actual usage of malloc for char* p is
p = (char*) malloc(sizeof(char)); and not sizeof(char*).
It is required when you want to create memory for 2 dimension array of POINTERS.
For eg, char **p;
p = (char**) malloc(sizeof(char*) *...
I think sidalla's problem is to :
1) find if there is any integer in the given string.
2) If yes then convert it to integer value:
If I am right then,
Do this way.
1) Scan the string for integer's Ascii value (ie, 0-9). If found then find how big is the integer. If it can fit into the...
Tell me the exact question... <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
Search in Google site. <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
I think you need to improve the rpet's code little bit. Since you want to replace the ';' with ','. And when you already read a character the cursor is on the next character. Therefore you need to seek back by one byte and then fput ','. So that it should overwrite the ';'...
All the answers seems to be right. But we should always try to convince the author first , then suggest the better way.<br>Mr Sirbu has declared his structure in a right way. <br>struct node {<br> double x,y;<br> }...
Do you need whole Logic ? <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
Yes then your logic is O.K. <br>Just do one more thing.Don't use & before buf . If it is a string and then check whether it worked or not. <br>if(fscanf(fp, <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
Or else just include the time.h file . <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
Please elaborate your point. I didn't get your point . <br>I am giving the behaviour of fscanf() function<br><br>It returns the number of fields successfully converted and assigned; the return value does not include fields that were read but not assigned. A return value of 0 indicates that no...
As far as I know. Malloc allocates a continuous chunk of memory. But if you are making a linked list kind of thing. Then it is not necessary that all the nodes are contiguously allocated. <br><br>For eg, <br>int *p;<br>p = (int*)malloc(20* sizeof(int));<br>will allocate contigous memory of 20...
Yes as mentioned by Mike. The compiler is developed in the same way.<br> <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.