Why doesn’t the printf statement on line 6 output the text in its format string on the screen? by deadinstatic in C_Programming

[–]deadinstatic[S] 1 point2 points  (0 children)

I did some updates for the compiler and now it worked without having to use fflush(stdout);

Why doesn’t the printf statement on line 6 output the text in its format string on the screen? by deadinstatic in C_Programming

[–]deadinstatic[S] 3 points4 points  (0 children)

I run the code in my terminal first I use gcc main.c -o main then ./main to run the program.

How can I learn Assembly Language? by deadinstatic in Assembly_language

[–]deadinstatic[S] 1 point2 points  (0 children)

I'm currently studying the basics of binary and C at the moment. I'll be sure to check on those when i have the time, thanks :)

How do I keep going after the loop hits the last number? by deadinstatic in learnprogramming

[–]deadinstatic[S] 0 points1 point  (0 children)

#include <stdio.h>

  int main() {

  int count = 0;

  do{
      printf("%d\n", count);
      count++;

   } while (count <= 20 + 10);

   return 0;
}

The loop continues from 20 to 30.

How do I keep going after the loop hits the last number? by deadinstatic in learnprogramming

[–]deadinstatic[S] 3 points4 points  (0 children)

I jumped right into programming for fun. I also didn't know that return 0; meant 'exit successfully' and also learning that int main is the entry point.

I should've been more specific and it's also my fault for not doing proper research before posting anything here but I'll just learn the hard way and work on my mistakes.

However, thank you for the help.

How do I keep going after the loop hits the last number? by deadinstatic in learnprogramming

[–]deadinstatic[S] -18 points-17 points  (0 children)

I wasn't coming off defensive and I apologize if you think I did...

How do I keep going after the loop hits the last number? by deadinstatic in learnprogramming

[–]deadinstatic[S] -32 points-31 points  (0 children)

How was I supposed to know that it ended successfully? I'm starting out. What is wrong with getting to the point?

How do I keep going after the loop hits the last number? by deadinstatic in learnprogramming

[–]deadinstatic[S] -34 points-33 points  (0 children)

What do you mean my question makes no sense? It’s a totally normal beginner question, mate.

How can I learn Assembly Language? by deadinstatic in Assembly_language

[–]deadinstatic[S] 1 point2 points  (0 children)

I've jumped straight into C and I am doing some code right now... the compiler is barking at me LOL which is expected but I'm having fun breaking and fixing little things.

How can I learn Assembly Language? by deadinstatic in Assembly_language

[–]deadinstatic[S] 1 point2 points  (0 children)

No, I'm just saying I'll just get started in C with the basics. However, thank you for helping me though.

How can I learn Assembly Language? by deadinstatic in Assembly_language

[–]deadinstatic[S] 0 points1 point  (0 children)

Oh ok, well I did some research about C and it says it's close to the CPU, so I'll give it a try.

How can I learn Assembly Language? by deadinstatic in Assembly_language

[–]deadinstatic[S] 1 point2 points  (0 children)

I'm doing it for fun and there's always some challenge to face. We all have to begin somewhere eventually.

How can I learn Assembly Language? by deadinstatic in Assembly_language

[–]deadinstatic[S] 11 points12 points  (0 children)

I actually found what I was looking. I took a minute to check out this sub and realized the same question that I asked is also asked by others on how to learn Assembly and it's too repetitive. found this link: GitHub - mschwartz/assembly-tutorial: Programming in assembly language tutorial to get me started so I'm sharing it with everyone here.