Questions tagged [infiniteloop]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

Understanding infinite loop with while loop

#include <stdio.h> #include <cs50.h> int main(void) { int h; h=get_int("h "); while (h>2){ printf ("ffff"); } } As any integer greater than 2 entered, there is an ...
0
votes
1answer
52 views

PSET6 DNA Think I'm getting an infinite loop which is apparent when testing with every txt file after 4.txt

Hi all I'm having trouble for PSET6 DNA. My code works fine for everything up until and including 4.txt but whenever I go to check the large.csv file and thus 5.txt, 6.txt, 7.txt and so on I seem to ...
0
votes
1answer
56 views

EOF NOT WORKING IN PSET 3 LESS FIND

CURRENTLY I AM TRYING TO SOLVE THE PSET3 LESS FIND BELOW IS MY CODE.PROBLEM IS THAT WHEN I WANT TO USE CTRL-D FUNCTION TO EXECUTE EOF FUNCTION IT DID NOT WORK.I THINK CODE ENTER IN A INFINITE LOOP BUT ...
0
votes
1answer
43 views

won function does not seem to return true (even though it should)

So this has been a little frustrating. Even though the rest of the problem went well I cannot figure out where I went wrong. Here's the idea; set a counter called value that increments by every time ...
0
votes
1answer
107 views

PSET3 Binary Search Function Infinite Loop

When I try running find.c inputting: ./generate 1000 50 | ./find 127 it should return that the value (127) was found, however when I do it with my code, it seems to create an infinite loop. Also, ...
0
votes
1answer
41 views

pset5 compile but it's thinking too long so it must be wrong

I've moved ahead from my segfault in load (i think) (see previous post here) But now my code seems to run an infinite loop which am pretty sure still originated from the load (as debug50 does not ...
0
votes
3answers
760 views

Infinite looping in hacker 1 - water

My do-while loop successfully rejects negative numbers and 0, however, if I input text such as "foo" when prompted for the length of a shower in minutes, the program runs into an infinite loop, ...
0
votes
1answer
35 views

Infinite looping

Credit PSET 1 Hacker: The below code compiles and executes but in an infinite loop. I've tried writing the while condition a few different ways, but it seems to end up the same. I can get the ...
0
votes
1answer
105 views

Pset4 recover problems detecting jpg data

So right now, my code can open the compact flash card and look for jpg headers byte by byte. It tells me that it has found 16 jpg files (which is what I had anticipated). However, my concern is ...
0
votes
1answer
179 views

Recover Infinite Loop

I have been working on the "recover", however although it compiles but it tend to run into an infinite loop when searching for the start of the jpgs. Here are my coding for searching the start of the ...
3
votes
1answer
9k views

How to quit when running into an infinite loop

How to quit when I run into an infinite loop in terminal window? It just prompts again no matter what I type.