ah ok, thanks^^
Type: Posts; User: Placebo
ah ok, thanks^^
Just practice - has no other purpose.
ah ok,
but with NUL char yoou do not mean '\0', since '\0' is also existing within every char-array at the end and hence also within
every initialized string?
All right, thanks:)
Hi!
#include <stdio.h>
int stringlen(char* field, int length) {
int i = 0;
while(field[i] != '\0') {
...............
Hi!
Thanks for the reply - Im afraid I still do not fully get it.
Hi!
Im not sure why the following output of the following code is:
2 15 6 8 10
Code being:
#include <stdio.h>
About your hint regards to recursion - you have basically pinpointed well my general problem which I have with recursion:
Even regards to the simplest, basic recursion-examples to illustrate things,...
Hi!
Printing out a number in reversed order, I was able to do interative:
#include <stdio.h>
int digits_reversed_iterative(int num) {
int erg, reversed, digit, i;
Hey, oh indeed now it works.
Thanks anyways for all the input and hints.
Hi!
When the user-input is 0, it should imo enter the else-cascade and print out " 1 1" ?
But this does not happen - can anyone see why not?
#include <stdio.h>#include <stdlib.h>
I mean, it's not that I have not been trying to solve the given exercise (number-sequences) myself - then I have posted my results where I can see what the code does different than what I want it to...
Somehow this thread does not bring me closer on topic tbh - I will try your exercise advice and the last one (pen and paper is anyways my default start), but can someone please concretely post here...
Thanks salem!
I will post in a bit my new code with the new adjustment (still cannot excel your given task before, fully).
@christop:
Thanks for the explantation - makes sense to me.
The...
Hey, I did put the relevant code in text using the CODE-tags - is this what you mean?
The second code can be ignored.
Hi!
Thanks for your initial help.
Before I try again to print out an X, I want to understand and finally execute your exercise (printing out the choosen sequence).
I post here my first attempt...
Hi!
I want to print out a 'X' with as many rows, as an input-value would have.
This picture will describe hopefully better, what I want to do:
Screenshot - 0781ad21c51043868573c8ecc3b4b448 -...
Thanks for the suggestions - I will take a look and try to understand the sourcecode myself.
Hi!
First of all, I know that my code in regard to solving the task (logic) is still wrong and I will deal with it afterwards.
For now, I am stuck at the technical details, since my program is even...
Thanks, helps a lot.
Just did not imagine for an unknown reason that expressions are getting executed when they appear within the brackets of a for-loop.
But in hindsight, of course the expression...
Ah, now I indeed got it - thanks a lot!
Also, thanks Salem for your hint.^^
Hey,
thanks a lot, your hint helped me out:
15701
The problem is though that I do not understand why we must assign the value directly before the inner loop begins, i.e. directly before we...
Hi!
Here is a small piece of code with the output:
15699
I do understand that given the 2nd initialization (i = 1) , the following condition is not true and hence the program leaves the loop...
Hi!
As an exercise I would like to turn following nested for loop into a nested while loop:
15696
But somehow it does not work out the way I want it to and obviously after all iterations are...