🌐
OnlineGDB
onlinegdb.com › online_c_compiler
Online C Compiler - online editor
OnlineGDB is online IDE with c compiler. Quick and easy way to compile c program online. It supports gcc compiler for c.
🌐
OnlineGDB
onlinegdb.com
GDB online Debugger | Compiler - Code, Compile, Run, Debug online C, C++
Online GDB is online compiler and debugger for C/C++. You can compile, run and debug code with gdb online. Using gcc/g++ as compiler and gdb as debugger. Currently C and C++ languages are supported.
🌐
OnlineGDB
onlinegdb.com › fork › S13OWDh3b
GDB online Debugger | Code, Compile, Run, Debug online C, C++
Online GDB is online ide with compiler and debugger for C/C++. Code, Compiler, Run, Debug Share code nippets.
🌐
Landing.Jobs
landing.jobs › home › an intermediate guide to debugging c code with online gdb c compilers
An intermediate guide to debugging C code with online GDB C compilers - Landing.Jobs
February 16, 2023 - Thread debugging commands include “info threads” to display information about all threads, “thread” to switch to a specific thread, and “break thread” to set a breakpoint only for a specific thread. One major advantage of using an online GDB compiler is that it allows developers to debug their code in a web browser without needing to install GDB on their local machine.
🌐
Programiz
programiz.com › c-programming › online-compiler
Online C Compiler - Programiz
Write and run your C programming code using our online compiler. Enjoy additional features like code sharing, dark mode, and support for multiple languages.
🌐
WebCatalog
webcatalog.io › home › apps › software development › onlinegdb › desktop app
OnlineGDB - Desktop App for Mac, Windows (PC) - WebCatalog
OnlineGDB is an online compiler and debugger for C/C++, offering code editing, execution, and debugging features accessible from any internet-connected device. | Use OnlineGDB in a dedicated, distraction-free window with WebCatalog Desktop for ...
🌐
LogicMojo
logicmojo.com › online-gdb-compiler
Online GDB Compiler By Logicmojo
In general, a debugger is a utility that runs a target program in a controlled environment where you can direct the execution of the program and see its status when it is paused. GDB is a debugger that can be used to analyse C/C++ programs.
🌐
Stack Overflow
stackoverflow.com › questions › 75880897 › why-does-online-gdb-c-compiler-while-debugging-my-code-suddenly-stops
Why does online GDB c++ compiler while debugging my code suddenly stops? - Stack Overflow
Also read: Why should I not #include <bits/stdc++.h>?, Why is "using namespace std;" considered bad practice?. Also see MSYS2 for a way to install GDB locally, if you want to use it for Windows apps (as opposed to GDB on WSL for Linux apps).
🌐
OnlineGDB
onlinegdb.com › online_c_debugger
Online C Debugger - online editor
/****************************************************************************** Online C Debugger. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Debug" button to debug program.
Find elsewhere
🌐
JDoodle
jdoodle.com › c-online-compiler
Online Compiler and Editor/IDE for Java, C, C++, PHP, Python, Ruby, Perl - Code and Run Online
JDoodle is an Online Compiler, Editor, IDE for Java, C, C++, PHP, Perl, Python, Ruby and many more. You can run your programs on the fly online, and you can save and share them with others. Quick and Easy way to compile and run programs online.
🌐
OneCompiler
onecompiler.com › c
C Online Compiler
OneCompiler's C Language editor helps you to write, compile, debug and run C code online. It's powered by GCC compiler
🌐
Compiler Explorer
godbolt.org
Compiler Explorer
Compiler Explorer is an interactive online compiler which shows the assembly output of compiled C++, Rust, Go (and many more) code.
🌐
Onlinegdb
learn.onlinegdb.com
Learn Programming Step by Step | Learn Programming step by step
Skip to main content · Choose a programming language you want to learn
Top answer
1 of 2
3

Whoops you have an infinite loop here

//This creates a LCV for the do loop below and sets it equal to 0.

int y = 0;

//This do loop generates the random number.
do
{
    //This generates a random time seed.
    srand(time(0));

    //This generates a random number between 1 and 99.
    ran = rand() % 100;

    //This while controls the do loop.
}while (y != 9);

y is initialized to 0 and you are looping while y!=9. And that is just the first error, there might be more.


Bug #2

int z = 1;
//This makes the program only create a random number the first pass through the loop.
if (z < 2)
{
    //This runs the random number generator function.
    return randomgen();

    //This sets the result of the function as the random number.
    randnum = randomgen();

    //This sets the random number to the current number.
    num = randnum;
}

After fixing infinite loop in randomgen(), You are immediately returning...

2 of 2
1

you have two problems in your code: the first one is that you have infinite loop in randomgen() function the condition in check against y - y != 9 but the value never update

int randomgen() 
{
    //This creates a variable to store the random number.
    int ran;

    //This creates a LCV for the do loop below and sets it equal to 0.
    int y = 0;

    //This do loop generates the random number.
    do
    {
        //This generates a random time seed.
        srand(time(0));

        //This generates a random number between 1 and 99.
        ran = rand() % 100;

        //This while controls the do loop.
    }while (y != 9);

    //This returns the random number for use in the rest of the program.
    return ran;
}

and the second one is even if you pass the loop in the function you exit main right away because the call to the function randomgen() is with return

if (z < 2)
{
    //This runs the random number generator function.
    return randomgen(); <-- **second problome**

    //This sets the result of the function as the random number.
    randnum = randomgen();

    //This sets the random number to the current number.
    num = randnum;
}
🌐
BibSonomy
bibsonomy.org › url › 8d06f8668c3dfd984211b57b46ba60f1
GDB online Debugger - Code, Compile, Run, Debug online C, C++ | BibSonomy
cpp · debugger · gdb · ide · online · webapp · @cnp 9 years ago · (last updated 9 years ago) References · Bookmarks · deleting review · Please log in to take part in the discussion (add own reviews or comments).
🌐
OnlineGDB
onlinegdb.com › online_objectivec_compiler
Online Objective-C Compiler - online editor
/****************************************************************************** Online Objective-C Compiler. Code, Compile, Run and Debug Objective-C program online. Write your code in this editor and press "Run" button to execute it.