So if we assume the constraint is that you can use two output statements...the code above works as a solution :)
Type: Posts; User: Fauveboy
So if we assume the constraint is that you can use two output statements...the code above works as a solution :)
I guess you see an alternative nested loop to the one already there?
I need to enumerate four rows?
The pattern I observe in the decreasing symbols is that it decreases by two on a new row?
I...
I wanted to share a problem solving exercise from the
second chapter in the book "Think Like A Programmer".
The program below is mean't to produce this pattern
from hashtags:
########
...
Im confused by the line pos = ptr - buffer;
This is used to find the distance from the start of the buffer to the max samp. But as buffer is always essentially the address of the first element,...
thank you for your answer. I'm not sure it has clicked yet
if argv[1] is checked in the loop then the statment argv++ occurs I only see how we're now on argv[2]. which is confusing currently...
I've attached the programme iscale.c which is taken from an exercise in the audio programming book.
I get confused by aprox line 50 where it says:
notes = atoi(argv[1]);
as far as I can...
sorry for the previous attachments, ive now posted the code below.
I understand that there is an appropriate formatter for pointers and
by using %p you get a number which is the address of what the...
I’ve attached two short c programs which I’ll be referencing
in the text below, if you have a moment please ctex.zip find in this
LINK>> WeTransfer
Attachment also here:
15458
It contains...
However, its seems that on the left side of the "=" with series[m][0], only the elements are adjusted wheres on the right side of the "=" the values are influenced is that right? What makes for this...
ah...arithmetic isn't moving through the array elements it's pointing to the actual values.
I think this code proves that. whats the difference here between this code and: series[m-1][0] + series[0][m-1] - series[0][m]?
the compiler warning:
chap0_array.c:18:36: warning: array index -1...
the programme works with now the correct arg inputs. under /*create inversion in column 1*/ I just don't understand why series[0][-1] = -1 before using mod12() = 11.
but series[0][-1] is invalid ?...
These are some results here:
m=1, m-1=0
note before mod=0
note after mod=0
but:
series[1][0] = mod12(series[0][0] + series[0][0] - series[0][1]);
means that series[1][0] -= series [0][1];
whats happens where [0] - [1]?
So far I can only see it means [0] - [1] = [-1],...
The programming is meant to make A matrix for serial music using the 12 tone technique. I can't visualise whats happening in specfically this bit of code
/* create inversion in column 1 */
...
...a single hexadecimal value, by isolating one such as 0xF(F, the "F" here)00, is represented by four bits?...is that global for all computers? how would to book know to demonstrate the 0xFF00 as...
I think I'm getting confused by the use of Hexadecimal values...I do not understand what bitmasking is with this example? I can't see whats happening as a result of the code to demonstrate this...
I'm doing an exercise which needs to find a percentage of something...
In the code below, when I initialise x with 100.0 / 8.0 it the output is correct, however. If I write x = 100 / 8 it says...
I've started making a project saving and backing the commits to sourcetree. But I need to share the source code online how can i move a project from source tree to bitbucket>
How does the result of 1 % 2 = 1? I get that with 3 % 2, two goes in once and one is left over. But two, however, doesn't go into 1 once it goes in 0. Is the reminder the 1 it didn't divide into?
so its a signed int short it that gets overloaded? once it gets over 0x7FFF it gets inverted ? going from 32768 to -32768 "FFFFFFFFFFFF8000".?..
If int one_billion = 1000000000 is times by three it displays -1294967296.
Apparently a truncating happens? but I thought truncating would suggest a chopping off of digits?...however 1 billion times...
I can comprehend why any number smaller that the number the other side of modulo equals the smaller number. How does this work?
int main()
{
int mod = 2;
mod %= 12;
if I leave the &dummy and second %c specifier scanf with ¬e2 gets an error later. is that because without the dummy the second scanf recieves the carriage return? I not sure why ¬e2 doesnt also...
I wasn't sure where to post this question but I hope its appropriate here ...
If anyone has studied this book...I'm confused on chapter 0.2.2 which mentions compiling (which is fine). Then...