Difference between Turbo C and Borland C compiler closed

0 votes

I compiled two pieces of code using the Turbo C++ 3.0 and Borland C++ 5.02 compilers, and the results are as follows:

First Code

void main()
{
}  

Second Code

#include<iostream.h>
#include<conio.h>
void main()
{
}
and i got these results from them :
- Borland C++ (First Code) : 51KB
- Borland C++ (Second Code) : 51KB
- Turbo C++ (First Code) : 5.89KB
- Turbo C++ (First Code) : 16.3KB
I checked two Borland execute files with a hex viewer and realize they are exactly the same.
I examined the First Code form these compilers in IDA pro and come across these graphs :
turboC++

borlandC++

Now I'd like you to respond to these questions.

1-Why are Borland C++ compiled files the same when one obviously lacks certain inclusion and the other does?

2-Why are the Boland C++ compiled files so large? 

(almost ten times larger) and what is compiled that large?

3-When I submit the First Code to this Site, I can view the assembly code of a basic void main function and discover that the Borland C++ code is pretty similar but the Turbo C++ assembly code is highly intricate and not the same, why?

4-How did this basic code, generated using Turbo C++, generate so many functions, as seen in the graph?

Jun 20, 2022 in C++ by Nicholas
• 7,760 points
1,165 views

1 answer to this question.

0 votes
I will try my best to respond, but you may need to post your queries to the Borland forums for more extensive responses.

Upgrade your compilers in any case.

1-Why are Borland C++ compiled files the same when one obviously lacks certain inclusion and the other does?

Your programme is ineffective and inaccurate.

(The main function always returns an int.)

You are free to include as many header files as you wish.

Because you do not utilise them, no additional code is created.

There are no header files required for your software.

They both serve the same purpose.

2-Why are the Boland C++ compiled files so large?

(almost ten times larger) and what is compiled that large?

There are several options.

You must examine the resulting assembly code, machine code, or post to the Borland forums.

This is also affected by whether you compiled in Debug or Release mode.

It also depends on whether or not you built for static or dynamic libraries.

Fundamentally, the Borland Compiler may be creating code that is compatible with newer versions of Windows than Turbo C++ was mandated to support.

Investigate the distinction between the ".com" and ".exe" file types.
answered Jun 21, 2022 by Damon
• 4,960 points

Related Questions In C++

0 votes
0 answers

Difference between for loop and the range based loop in C++

The distinction between a for loop and ...READ MORE

Jul 11, 2022 in C++ by Nicholas
• 7,760 points
593 views
0 votes
0 answers

What is the difference between Java and C++?

What is the difference between Java and ...READ MORE

Jul 22, 2022 in C++ by Nicholas
• 7,760 points
360 views
0 votes
1 answer

What is the difference between operator overloading and operator overriding in C++?

Some people use the latter word to ...READ MORE

answered Aug 2, 2022 in C++ by Damon
• 4,960 points
1,929 views
0 votes
0 answers

Difference between 'struct' and 'typedef struct' in C++?

In C++, is there any difference between: struct Foo ...READ MORE

Aug 8, 2022 in C++ by Nicholas
• 7,760 points
699 views
0 votes
0 answers

How to copy turbo c++ output?

How can I replicate the output of Turbo C++?  I had already Googled the issue, but in vain.  It suggests to either print scrn and paste or right click, select all, and paste.  I tried both, but neither worked.  The issue is that it simply copies what is on the current screen.  But I want the entire screen from the start.  (Alt+printscrn is also ineffective).  What should I do in this situation? printScrn Alt+printScrn markall None of them are operational!! I can't assist you if you require this archaic technique of programming for whatever reason, but I'd want to find a solution.  I tried forwarding the output stream to the file in this manner, but it did not work. #include<iostream.h> #include<conio.h> #include<stdlib.h> const int max=50; class dequeue{ int dq[max],r,f,c,x,i; public: dequeue(); void insertRear(); void insertFront(); void ...READ MORE

Jul 7, 2022 in C++ by Nicholas
• 7,760 points
1,435 views
0 votes
0 answers

How can I terminate an infinite loop in Turbo C?

I get caught in an infinite loop.  How can I break this cycle?  Cntrl-C was attempted, however it had little effect.  I have no idea how to stop it. main() { ...READ MORE

Jul 13, 2022 in C++ by Nicholas
• 7,760 points
2,319 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 11, 2018 in Python by Priyaj
• 58,020 points
686 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 21, 2018 in Python by Priyaj
• 58,020 points
2,386 views
0 votes
1 answer

C++ code file extension? What is the difference between .cc and .cpp [closed]

GNU GCC recognizes all of the following ...READ MORE

answered Jun 21, 2022 in C++ by Damon
• 4,960 points
1,507 views
0 votes
1 answer

What is the difference between public, private, and protected inheritance in C++?

To begin answering that question, let me characterise member accessors in my own terms.  If you already know this, proceed to the section "next:". I'm aware of three types of accessors: public, protected, and private. Let: class Base { public: ...READ MORE

answered Jul 11, 2022 in C++ by Damon
• 4,960 points
747 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP