Why my laptop takes restart when run some program?

Discussion in 'Programming' started by banglafive, Apr 17, 2012.

  1. #1
    I am a new learner of C language. I have used Turbo C for compile my program. But sometimes it took my laptop to restart when I go to run some of programs. To run Maximum programs have not any problem to my laptop. But some easy and short program took restart my laptop every time when I go to run that.
    I have very little knowledge about "C" language. I am a new learner. So please give me a solution for this problem. It will be very helpful for me to learn C language quickly.
     
    Solved! View solution.
    banglafive, Apr 17, 2012 IP
  2. #2
    Maybe you have infinite loops or bad logic in your program which makes the laptop to overheat and restart. Have you observed cpu, memory usage while executing the "bad" programs?
     
    showdown, Apr 18, 2012 IP
  3. banglafive

    banglafive Peon

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you so much.
    It have not any infinite loop on those program. But I am confused about bad logic. How may I check if there were any bad logic. I also observed my cpu & found overheat while it takes restart.
     
    banglafive, Apr 19, 2012 IP
  4. bomzas

    bomzas Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It does sound like you have a nested infinite loop if you cannot find a main infinite loop. If I were you I'd redesign your code and not use loops until you are more efficient with coding
     
    bomzas, Apr 21, 2012 IP