Like Tree2Likes
  • 2 Post By rogster001

Blank screen, while executing the program

This is a discussion on Blank screen, while executing the program within the C Programming forums, part of the General Programming Boards category; Dear All, I am facing this problem right from the time when i first installed Turbo C_3, the compiler runs ...

  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    3

    Blank screen, while executing the program

    Dear All,

    I am facing this problem right from the time when i first installed Turbo C_3, the compiler runs fine, but the execution screen is just blank with no error messages. its just a blank screen with no output, i checked the output file, is creating.

    there are no errors in the program, and this is really annoying.

    i am using Windows Xp, SP - 0 OS, i tried it on my laptop too which has SP_2, but still the same thing which makes me think i have to tweek something on the TC options before it. If so kindly let me know.

    Please help me with this regard.

  2. #2
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,438
    Well one fix for this issue in Turbo C is to find the 'uninstall' option and use it.
    Alternatviely go to program files folder and find the turbo c folder. choose 'delete'
    then go to the recylce bin and choose 'empty' -
    click yes when prompted 'do you want to permanently delete turbo c'

    Then go and get Code::Blocks
    Last edited by rogster001; 03-25-2012 at 02:40 AM.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  3. #3
    Registered User
    Join Date
    Mar 2012
    Posts
    3
    @rogester001 : cool, i took ur advice, got it installed, here's my sample programme,

    Code:
    #include<stdio.h>
    void main()
    {
    int num1,num2,num3,sum;
    float averag;
    printf("Entre the three nos\n");
    scanf("%d %d %d",&num1,&num2,&num3);
    sum=num1+num2+num3;
    averag=sum/3.0;
    printf("sum = %d\n Average = %f\n",sum,averag);
    }
    Execution window shows this mess : Process returned 0 <0x0> Execution time : 0.000s
    without actually producing any o/p, what might probably be the error?

  4. #4
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,651

  5. #5
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,438
    Rags is probably right there, although If you have ran it from the code blocks CTRL+F10 (run) option then there is an automatic halt placed on the console runner anyway. If you are using CTRL+F10 to run from the ide that is..if you have gone into the /bin folder to run the debug or release build directly then it wil disappear yes.
    Last edited by rogster001; 03-25-2012 at 09:27 AM.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  6. #6
    Registered User
    Join Date
    Mar 2012
    Posts
    3
    Well guys, i tried getchar(); too earlier...but had no luck,i even tried to execute the example programs that come included in the software package, but had no luck even there. I used c programs while at college, had no problems then, in the same computer.

  7. #7
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,438
    So you read the lnk that was posted and associated info? Anyway, in windows you can call system pause that will do it..in a specific use case. just check out the reading on why / why not use this type of thing though
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  8. #8
    Registered User
    Join Date
    Mar 2010
    Posts
    535
    Sounds like some dodgy Turbo C compiler or library behaviour. What you've written should work fine.

    Beware that getchar() blocks until you hit enter. So
    Code:
    c = getchar();
    Will put whatever character you entered in c, but then it'll go straight through a subsequent getchar() because there's a newline waiting to be processed on stdin.

    You shouldn't use getchar() for getting the numbers, but you could use it to block before exit to avoid the command prompt disappearing. Just make sure the previous scanf() eats the newline (put it in the format string). And should all be good.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 12-01-2007, 03:10 PM
  2. Replies: 40
    Last Post: 09-01-2006, 12:09 AM
  3. Blank output screen after compiling C.
    By thunderdome in forum C Programming
    Replies: 2
    Last Post: 01-19-2006, 05:53 PM
  4. blank output screen !!
    By samirself in forum C++ Programming
    Replies: 4
    Last Post: 05-02-2005, 08:26 AM
  5. get rid of my blank screen!
    By lambs4 in forum Game Programming
    Replies: 6
    Last Post: 01-22-2002, 08:15 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21