Questions tagged [turbo-c]

Turbo C was an Integrated Development Environment and compiler for the C programming language from Borland, released in 1987. It had been re-release as freeware version 2.01 by 2006.

First introduced in 1987, it was noted for its integrated development environment, small size, fast compile speed, comprehensive manuals and low price.

Today, Turbo C is considered obsolete. It is a 16-bit compiler for DOS environments, and as such cannot access more than 640 KB of memory (and even that only with difficulty), and cannot interoperate with 32- and 64-bit code in modern operating systems. Additionally, due to its age, its standard library differs in some significant fashions from modern C libraries. Plainly put, it is not an appropriate tool for many development tasks today.

Despite this, it is sometimes used in introductory C programming courses, particularly in India. Students using Turbo C should keep its limitations in mind.

273 questions
4
votes
5 answers

Sequence of if-else if in C

I' using the following logic for testing whether the triangle is isosceles, equilateral, scalene or right angled. if (side1 == side2 || side2 == side3 || side1 == side3) printf("Isosceles triangle."); else if (side1 == side2 && side2 == side3 &&…
kartikeykant18
  • 1,737
  • 6
  • 28
  • 42
4
votes
5 answers

What exactly getch() does in C?

I thought (upto now) that the function of getch() reads a character from input buffer (or keyboard, to be simple). But i had to argue with my lab instructor. They say that the only work of getch() is to hold the program execution. I know that…
cipher
  • 2,414
  • 4
  • 30
  • 54
3
votes
2 answers

How to pause a loop in C/C++

I am trying to make a screen for a car game and make the screen wait for a key to go into the next screen, thing is that with this code it changes colors too fast. I've already tried delay() and sleep() which haven't worked properly. Also, after…
3
votes
4 answers

Turbo C compiler issue, sqrt() function not working with variable arguments

I searched the question similar to my problem Similar problem. But my problem is when using Turbo C compiler v3.0. Should I have to do some additional work for math.h file? please help. int main (void){ double result, a; clrscr(); …
AbdulAziz
  • 5,868
  • 14
  • 56
  • 77
3
votes
5 answers

pre and post increment operations on a variable give different output on TC and gcc

Here is my simple code ... #include int main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); return 0; } On gcc,it gives output as '4 5 5 5 5' but on TC,it gives output as '4 5 5 4 5' what I know that in printf…
Udit Gupta
  • 3,162
  • 11
  • 43
  • 71
3
votes
1 answer

How to enable linking floating point library in TurboC?

I'm newbie in C language... Just want to ask how to enable linking floating point library in TurboC?
Aaron
  • 1,969
  • 6
  • 27
  • 47
3
votes
2 answers

pieslice() function in C

How can I draw a major pieslice in C, using the function pieslice()? pieslice(X-centre,Y-centre,StrtAngle,EndAngle,Radius). I am trying to draw a major sector or pieslice in C, using the pieslice function; I want the start angle to be 135 degrees…
TruckDriver
  • 1,383
  • 13
  • 28
3
votes
4 answers

Using assembly routines with C on DOS

I've been playing with DOS real mode assembly for a while and now I want to utilize some routines in a C program. I'm using Turbo C 2.01 and TASM 3.0. I'm however unable to modify a variable passed by address, see the _setval routine below. I don't…
foregam
  • 33
  • 3
3
votes
2 answers

Profiling computations in Turbo Pascal and Turbo C

I recently been doing some tasks for university, which include using Turbo Profiler (the software is implicitly declared in the task, sadly) for profiling C and Pascal implementations of Simpsons numerical integration. I came across very strange…
Semyon Danilov
  • 1,753
  • 1
  • 17
  • 37
3
votes
4 answers

about turbo c working under windows 7

i am using windows 7 64 bit laptop.i installed turbo c and write programs using dosbox, but i can't run the program.... when run is selected it show some message like not an :exe plz give solution to this problem
shana
  • 31
  • 2
3
votes
3 answers

Windows.h in C using Turbo-C

I cannot find windows.h in my include folder of Turbo C and hence cannot work with the Win32 api's Can someone please suggest a workaround? thanks
Jayesh
  • 3,891
  • 11
  • 55
  • 83
3
votes
2 answers

Boundary fill algorithm in C not working (Computer Graphics - C Programming)

I'm trying to implement the simple boundary fill method (using 4 connected approach) for filling a rectangle. I did it as follows (code below), but the rectangle is not getting filled properly: it stops filling when it reaches the half portion of…
JeNy
  • 87
  • 2
  • 5
  • 13
3
votes
2 answers

Can anyone suggest a way of coding captureing keystrokes without waiting for keys to be pressed?

I'm coding a snake game in C and my compiler is turbo C. I've got a problem with moving the snake. I need a function or a way of coding so that I can move my snake without the keyboard waiting for a key to be pressed. but if a key is pressed some…
Melika Barzegaran
  • 429
  • 2
  • 9
  • 25
3
votes
2 answers

Definition/body of the printf & scanf function in C

Where do i find the definition/body of the printf/scanf & other similar predefined commonly used functions (getch, clrsr ...etc) of "Borland C" ?
abhishek-23
  • 496
  • 3
  • 5
  • 15
2
votes
2 answers

Handling A Keyboard Interrupt with Turbo C ++ 3.0

I have a project. That is a simple game , "Falling Blocks" . The game area is considered as a grid, which has 20x20 size. There will be falling blocks from top of the screen and a hero at the bottom, who will shoot the blocks. The aim of game is…
Jemo
  • 309
  • 6
  • 19
1 2
3
18 19