Hi, already figured it out, wrote an example program:
#include<stdio.h>
#define row 3
#define col 4
int main(){
int N,M,L,i,j,k, *p;
Type: Posts; User: dxgalaxy
Hi, already figured it out, wrote an example program:
#include<stdio.h>
#define row 3
#define col 4
int main(){
int N,M,L,i,j,k, *p;
Ah, I wrote it in a hurry:
In the example array:
0 0 0 0
0 0 0 0
0 3 0 0 <- p points to the cell with the 3
0 0 0 0
0 0 0 0
It should become:
0 0 0 0
*Sigh*, english isn't my native language, and I don't know very well how to translate computational terms.
I showed an example of the array so I thought it wasn't necessary to clarify it was a 2D...
Hi, I've a dinamically allocated array, which is filled with some data from a file, the array looks like this:
0 0 0 0
0 0 0 0
0 3 0 0
0 0 0 0
0 0 0 0
(dimensions may vary)
My program...
I see, this is pretty new to me.
My lecturer is always angry at us when we forget to make dimensions constant, I might use this to trim simple programs then, thanks for the reply :)
Hi, I got an assignment of doing a program to make the sum, substraction, etc. of a matrix A and a matrix B of given dimensions (Via keyboard, via detection, any method was possible).
I used...
Okay, I changed some lines with loops and got this :)
#include <stdio.h>
#include <stdlib.h>
int main(){
double value[5]={0,0,0,0,0};
Oh you're right :O I just deleted the keeper reset lines and initialized the array with zeros instead of '\0' 's :) it's my first time working a non-char array so I need to work on it.
Finished coding, and it works :D thank you for your help!
#include <stdio.h>
#include <stdlib.h>
int main(){
double value[5]={'\0','\0','\0','\0','\0'};
double keeper;
int num;
I searched and I found a function named qsort which can sort the values in the array but I don't really understand how it works :( the examples I found run, but I still don't know how to adapt them...
Hi, I'm new in this forum and also new at programming :)
I'm taking a C course at college but our lecturer is quite lazy, so we need to investigate most of the stuff. Currently, I'm stuck working...