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
-2
votes
1 answer

Running a function type of program when the C header file is in a flashdrive?

Im currently working on C, and would like to know if its possible to run a program when a user made header file is in a flashdrive. It works if the file is on a PC, but not sure if it would if its external. The code looks something like…
-2
votes
1 answer

Graphics (Rotation in 2D)

I am now trying for 8+ hours to solve this but cant figure it out, please help find whats wrong with my code. int main() { int gd = DETECT, gm; float ANGLE = 360/10 * M_PI/180; initgraph(&gd, &gm, NULL); int cx = getmaxx() / 2; …
Dpetrov
  • 546
  • 2
  • 5
  • 12
-2
votes
3 answers

Integer data type with more that 10 digits

I am using the long type for storing values but it doesn't store a number with more than 10 digits. Is there any way to make a new integer type with extended memory size (e.g. 12 bytes or more)?
Arya Sudan
  • 1
  • 1
  • 2
-2
votes
1 answer

How is the output 47?

#include #include #define FIRST_PART 7 #define LAST_PART 5 #define ALL_PARTS FIRST_PART+LAST_PART int main() { printf ("The Square root of all parts is %d", ALL_PARTS * ALL_PARTS) ; getch(); return(0); } In the…
Mihir Mehta
  • 89
  • 1
  • 9
-2
votes
1 answer

A program that inputs a year and displays “Leap year "if it is leap year or "Not leap year" if it is not leap year without using the modulus symbol

So far I've come up with this however it doesn't seem to output results consistently. if (year/4*4==year) { cout<<"It is a leap year!"; } else { cout<<"It is not a leap year!"; } How can i solve this?
-2
votes
2 answers

"Not an allowed type" in Turbo C++

I'm trying to make a grading system.So what i want to do is take 1/3 of the value of outputgrade and add it with 2/3 of the value of outputgrade2, I tried midterm1=(outputgrade()*1/3)+(outputgrade2*2/3) but I receive an error which is Not an…
-3
votes
1 answer

how to solve error ( functions containing switch are not expanded inline ) in C++

#include #include class hostel_mangt { public: int x,h,id,rc,hd; char name[15],dol[10]; void oprt_1() { cout<<"do u want to see or update room's ?"<
Aaryan_mb
  • 3
  • 1
-3
votes
1 answer

How can I delete all data from string (char array) in C lang?

I am scanning a string and I want that string to be only integer type elements so I did some validation for it and it worked for characters but it isn't working good enough for floating points. For e.g. If I enter 1.2 value as input then it does not…
Wackie
  • 77
  • 2
  • 9
-3
votes
1 answer

When I use the asterisk to indicate the field width, how come it is missing one space?

printf("12345678\n"); printf("%*c%*c, 2, 'a', 2, 'b'); On the console, I was expecting that a would be below 3 and b below 6 since the way I understand it is that I indicated two spaces before each character. However, the output shows that a is…
Satellite Sage
  • 440
  • 1
  • 4
  • 13
-3
votes
1 answer

How to fix text on a viewport C++

I have a view port but when i take an input (cin) the char that i put is shown outside the viewport. setviewport(0, 0, getmaxx(), getmaxy(), CLIP_ON); margin = 100; left = margin; top = margin; bottom = getmaxy() - margin; right = getmaxx()…
-3
votes
1 answer

How do i changed Turbo C7 's blue screen to something more pleasing?

The tc7 screen irritates my eye. I need something peaceful and lite. Is there a way to change or is there any better compiler?
Adarsh
  • 59
  • 6
-3
votes
1 answer

Abnormal program termination in turbo c 3.0 DOS box

I am getting an error Abnormal program termination when I execute this code. The objective the program is read array of numbers from file list.txt and perform recursive binary and recursive linear search on that loaded array. Here is my…
-3
votes
3 answers

Turbo c++ colour codes

I have been using turbo c++ from quite long time, I have noticed that there are by default 16 colours(0-15) but I know that there is a way to make your own custom background and text colours, does anybody know how to do it...?
Angad Singh
  • 1,032
  • 1
  • 17
  • 36
-3
votes
1 answer

Please Help me to understand old C code

I'm student and found this code on Internet. Can anyone explain algorythm used here? #include #include #include #include void main() { int count=50; clrscr(); while(count--) { …
-3
votes
1 answer

C Graphics Programming : Display X/Y Axis

How to display the x and y axis in Turbo C for graphics programming. I mean is there a known code for it which I have to add in my program to display the axes?