First of all, thank you for helping. I'm working on a university course project and we don't take memory fragmentation in consideration.
What I did that when I do insertion I check if count == 0.8...
Type: Posts; User: amohammed63
First of all, thank you for helping. I'm working on a university course project and we don't take memory fragmentation in consideration.
What I did that when I do insertion I check if count == 0.8...
Hi,
As the title, my questions is about hash table. I implemented all functions to be used in open addressing - quadratic probing. I created the hash table with initial size entered by me, and...
-5579207423999930400.0000 this is the value of multiplying 16 equations and substitute x = 5. So that why I'm looking for long double.
I'm using GNU GCC compiler on Windows 10, running the same code you wrote in my computer gives 0.0000.
Hello,
I have a project which is performing addition, multiplication and subtraction on a file of equations. Adding or subtracting a big number of equations and substituting a value of x in the...
Thank you @Salem and @laserlight for helping, I solved the problem but editing the find function, it works on copying the data of the original linked list and performs all operation on the copy and...
Sorry for that, I posted my full code following your instructions.
Here's my code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
AAAAH, I'm really tired. In my project I have a menu and the user choices is unlimited so that deep copying does not work since that the copy of the linked list is also affected, if the user chooses...
#include<stdio.h>#include<stdlib.h>
typedef struct number
{
int value;
} number;
number *add(number *x, number *y);
number *multiply(number *x, number *y);
int main() {
I'm a beginner, I was searching for videos to show what I'm looking for and I didn't found anything. I have two simple implementations of single linked list but both do the same behavior. I came here...
typedef struct number { int value;
} number;
number *add(number *x, number *y);
number *multiply(number *x, number *y);
int main() {
number x, y;
x.value = 50;
First of all, thank you for helping and guiding. I'll change all variables and lists with proper name. My aim was only to run the code firstly.
The code is well arranged but when I copied it...
typedef struct node { double coefficient, power;
struct node *Previous, *Next;
} *equationList;
typedef equationList node;
typedef equationList resultList;
void...
Can I show you few parts of my code and decide with me if I can change something in it or go to copying function?
I have three functions calls, is not hard to copy the linked list three times?
I have tried this, but also it changes the list in created in the main.
I know that but I really don't know how to deal with it since my data are lost during the pass between functions. I'm...
Firstly, I'm doing my best to skip deep copying. In my code, I have an array of linked lists that is passed to the addition function for example, I tried many ways to send it by value it and I...
Hi,
I have created a code that adds/multiplies/subtracts a file of polynomials. I have used doubly linked list (as required in the project), it works correctly as well as all functions. I'm facing...
Never mind, I solved everything.
Thank you for helping.
Yeah it's known that the line contains 8 IDs.
This code keeps reading the first ID
fgets(buffer, BUFSIZ, in); for (i=0; i<8; i++){
sscanf(buffer, "%d", &AR[i].e_num);
}
or...
How can I use sscanf for the first line which is a integer data? Also, I really don't know how to read line by line by using fgets.
If you could give me few hints about buffer since I don't know it.
Hello my dears,
I have a problem regarding to reading from a file.
The problem is that I have 4 lines in the text file, the first is the IDs of employees, and the second line is their names, so I...
Thank you very much for your time, sir.
It works now after this change:
for (n=0; n<3; n++){ b=x[j][n];
x[j][n]=x[i][n];
x[i][n]=b;
...
The matrix before swapping:
5 2 3
6 5 8
9 2 7
8 9 8
When I run the code I provided above the result is:
6 5 8 25
8 9 8 19
5 2 3 18
9 2 7 10