We are having a function like this . Can anyone help me in the output of DATA and the explanation of ADiv function. Thanks for your help in advance.
token values = 99.904046
and ADiv is in .h files as
No. You do not have a function. (Or at least you have not shown us a function.) You have shown us a declaration for an array of 10 unsigned long integer values (assuming we are looking at C or C++ code), you have shown us a comment (assuming we are looking at C++ or recent C code), you have implied that a character pointer named token has been set to point to the string "99.904046" (but you have not shown us any code that does that), you have shown us that you convert that string into a signed long integer value and assign the result to a signed integer named rec (assuming that you have correctly declared atol() or included the standard header in which it is declared), and you then assign an element of an undeclared array Data[] at an index in the array specified by another undeclared variable (i) to the division of the string mentioned earlier being converted to a floating point value (assuming that atof() has been declared correctly or that you have included the standard header in which that function is declared) by the 100th element of the 10 element array ADiv[] (which could by a division by a random value or a reference to an unallocated memory position yielding a random value or termination of your code with a memory fault).
ADiv is an array containing ten elements. In order for ADiv[rec] to access the value within the boundary of the array, the return of atol(token) must be the equivalent to an index between 0 and 9, inclusive, which it will not happen with the supposedly const char *token = "99.904046";
Last edited by Aia; 08-29-2015 at 01:46 PM..
Reason: added word inclusive
Here is the code. when I debugged I get token value as 99.904046 (this is the first token values we have lots of token value which we will get in getnext token function)
Dear folks
I have a map file of around 54K lines and some of the values in the second column have the same value and I want to find them and delete all of the same values. I looked over duplicate commands but my case is not to keep one of the duplicate values. I want to remove all of the same... (4 Replies)
Hi everyone,
This is an exemple of inpout.txt file (a "," delimited text file which can be open as csv file):
ID, Code, Value, Store SP|01, AABBCDE, 15, 3 SP|01, AABBCDE, 14, 2 SP|01, AABBCDF, 13, 2 SP|01, AABBCDE, 16, 3 SP|02, AABBCED, 15, 2 SP|01, AABBCDF, 12, 3 SP|01, AABBCDD,... (1 Reply)
Find out values between xml tag
.......
ABC><name></ABC><xyz>test</xyz>..here some other tag... <ABC><NUMBER></ABC><xyz>12345</xyz>....
.......
I want to take between bewtween ABC><NUMBER></ABC><xyz> to </xyz> that is 12345 (3 Replies)
Dear Friends,
I did the same question before in other thread, but I want to explain a little better my request.
I am looking for a way how to find and replace a values in two files using a reference a file where are the key to replace.
Basically, I want to keep a copy of the original file... (1 Reply)
hi!
could u help in the following? I have the data (long list!) that looks like (three coumns white space separated):
rs3094315 0.0665173 742429
rs12562034 0.0738998 758311
rs3934834 0.396449 995669
rs9442372 0.402693 1008567
rs3737728 0.406271 1011278
rs6687776 0.435429 1020428
rs9651273... (4 Replies)
Hi,
I have two files of the following format
file1
chr1:345-456
chr2:123-456
chr2:455-678
chr3:456-789
chr3:444-555
file2
chr1:345-456
chr2:123-456
chr3:456-789
output (2 Replies)
Hi,
I need help to find values between two different fields based on $6 (NUM) AND $1 (CD), within the same ID. The result should show the values between the NUMs which will be extracted from within $3 and $2 in data.txt file below.
data.txt
ex 139 142 Sc_1000004 ID 4
CD ... (2 Replies)