Working in an embedded (PIC) environment, programming in c.
I have to keep track of 1000 values for a variable (history) and return the moving average of those values. I'm just ... |
array[10]={2,3424,4234,42,234,234,23423,123,342,3}
In this array, how do I find the first five biggest numbers and the position of those numbers? I.e I want the output as
biggest number was 23423 and its ... |
What is the best practice for declaring large, global arrays in C? For example, I want to use myArray throughout the application. However, I lose the use of sizeof() ... |
So, given the following:
#include <stdio.h>
int * getarr();
int main(int argc, char* argv)
{
int * arr = getarr();
printf("%d", sizeof(arr));
}
int* getarr()
{
static int a[4] ...
|
I have the following code where I have an array. I add a large number to that array, but when printing it, it shows a smaller, incorrect value. Why is that, ... |
#include <stdio.h>
#define N 1024
int main(){
int i, j;
int a[N][N];
int b[N][N];
for (i=0;i<N;i++){
a[i][i]=i;
b[i][i]=i;
}
for (i=0;i<N;i++)
...
|
|
|
Hello, I want to have a large array. I have a structure which contains 6 fields, 4 of them are unsigned char and 2 of them are unsigned short. I should have an array of 80 elements of type the above said structure. I would like to have it as a static array in a class, which I can refer to, ... |
What is the best way to store large arrays of numbers (eg, 4-byte integers)? Say I want to store an array of 1billion 4-byte integers.. If my computer has 4gB memory, then is this possible? int Large_Array[1000000000]; This will cause a "stack overflow" when i try and execute. How can I do this? |
I've been learning Visual C++ on the fly at work for the last 2 weeks and could use some help. I'm writing a program to read a .raw file which has a standard format of 9 columns and then depending on the size of the object, a large number of rows. I then need to rotate it and write the new ... |
|
cbdeja@my-deja.com I am using a "unsigned long long" as a label to identify various transactions that are taking place in my program. The label is reserved during the lifetime of the transaction and then released for re-use. There may be many transactions taking place at any time. I need to mark those labels which are in-use so that a new label ... |
cbdeja@my-deja.com I am using a "unsigned long long" as a label to identify various transactions that are taking place in my program. The label is reserved during the lifetime of the transaction and then released for re-use. There may be many transactions taking place at any time. I need to mark those labels which are in-use so that a new label ... |
I'm looking at the ITA problem "BitVector Genealogy" at Current ITA Software Hiring Puzzles It involves 10,000 vectors of 10,000 bits each. I'm not used to dealing with this much info. My plan is to read in all the vectors and then create an array of ints to store the distance between each vector. My current plan is to read the ... |
A 300 * 300 * 300 array takes 27 million elements. Each element (if they are float) takes up 4 bytes, so the array takes up 104MB each. (Plus 300 + (300 * 300) pointers, but that's 0.3% of the total size, so we don't really worry about that). 30 x 100MB makes 3GB, which is more than what Linux and ... |
Hai, My serial interrupt routine collects all the data from the serial buffer (Controller) successfully, the data sent from the controller never exceed more than 2000 bytes. The problem is when the controller sends large no. of bytes for eg 400 bytes, the array "RecBuffer" holds all the bytes successfully but when i look at the array RecBUffer after the interrupt ... |
|
You're looking at over 12mb of static memory there if you assume a 32-bit float, so I wouldn't be surprised if you're getting a stack overflow. With that much data, I'd suspect you won't need to access it all at once so your easiest bet would be just to write what you don't immediately need to some sort of swap file ... |
i've got an assignment which i have absolutly no idea how to start.. i'm not asking anyone to do it for me, but just a little help to get me started off.. we need to be able to break up numbers and store them as separate elements in an array. so say you have the number 42, create an array which ... |
20. large array cboard.cprogramming.com |
|
I am a newby, writing a program in C which reads and parses a file as bytes. The file is well over 2 million bytes long and I found that I couldn't initialise an array to hold this many char values within a function. I understand that this is because the memory is placed on the stack, and has a limit ... |
(Toggle Plain Text) Posing requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it you missed: Ask a question that can be answered. Do ... |