Hello everyone, i am facing a problem with turbo c, when i complie and run the program, the screen just shows a blank black sreen, nothing is executed. you press any button on keyborad, the screen returns back to the editor mode.
No program is getting executed, Found no errors on compiling, the program is just not getting executed.

its really annoying, can anybody help?

i am using windows xp, sp - 0.

Recommended Answers

All 5 Replies

Post your program so that we can see what you tried to do. Its likely either 1) the propgram did not compile because of errors, or 2) the program just doesn't do what you thought it should do. But we won't know until you show us your program.

@ancient dragon : thanks for replying, the problem is the programm is not getting executed right from the first time i installed turbo c, even for simple programs like finding sum of 2 nos. i have done, c programming when i was in college so have a fair idea on not making mistakes. the compiler is working fine anyway, its the execution screen which is just blank, no output, no error messages.

I am posting the sample programme anyway

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);
}

Again.....compiler doesn't show any errors, and the execution window is a wide BLACK BLANK SCREEN, as if its not resonsible for executing the programme.

A common mistake with unexperienced programmers. You need to add a line at the end to keep the window open. For example you can call getchar() so that it will wait for you to hit a key before closing.

this may be a dumb question, but do you hit the <Enter> key after entering the three numbers? If not, the program will wait forever for that key.

Yup i tried the getchar(); and i know where is entre key on my keyboard..:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.