You are on page 1of 9

The History of Turbo C

Turbo C is an Integrated Development Environment and compiler for the C programming language from Borland. First introduced in 1987, it was noted for its integrated development environment, small size, extremely fast compile speed, comprehensive manuals and low price. In May 1990, Borland replaced Turbo C with Turbo C++. In 2006, Borland reintroduced the Turbo moniker. The beginnings In the early 1980s, Borland enjoyed considerable success with their Turbo Pascal product and it became a popular choice when developing applications for the PC. Borland followed up that success by releasing Turbo Basic, Turbo Prolog and Turbo C. Turbo C had the same properties as Turbo Pascal: an integrated development environment (IDE), a fast compiler, a good editor and all that for a cheap price. Nevertheless, Turbo C was not as successful as the Pascal-sister product. First, C was not a school language such as Pascal, but rather a language for professional programming and systems development. Turbo C was therefore competing with a full field of professional programming tools (Microsoft C, Lattice C, Watcom C, etc.). Turbo C did, however, have advantages in speed of compiled code, the ability for large projects to be implemented, and compared to competing compilers a very low price.

Version history

Version 1.0, on May 13, 1987 - It offered the first integrated edit-compile-run development environment for C on IBM PCs. The software was, like many Borland products of the time, bought from another company and branded with the "Turbo" name, in this case Wizard C by Bob Jervis (The flagship Borland product at that time, Turbo Pascal, which at this time did not have pull-down menus, would be given a facelift

with version 4 released late in 1987 to make it look more like Turbo C.) It ran in 384 kB of memory. It allowed inline assembly with full access to C symbolic names and structures, supported all memory models, and offered optimizations for speed, size, constant folding, and jump elimination.  Version 1.5, in January 1988 - This was an incremental improvement over version 1.0. It included more sample programs, improved manuals and other bug fixes. It was shipped on five 360 KB diskettes of uncompressed files, and came with sample C programs, including a stripped down spreadsheet called mcalc. This version introduced the <conio.h> header file (which provided fast, PC-specific console I/O routines). (Note: The copyright date in the startup screen is 1987, but the files in the system distribution were created in January 1988.)

Version 2.0, in 1989 - The American release was in late 1988, and featured the first "blue screen" version, which would be typical of all future Borland releases for MSDOS. The American release did not have Turbo Assembler or a separate debugger. (These were being sold separately as the product Turbo Assembler.) See this ad for details: Turbo C, Asm, and Debugger were sold together as a professional suite of tools. This

seems to describe another release: Featured Turbo Debugger, Turbo Assembler, and an extensive graphics library. This version of Turbo C was also released for the Atari ST, but distributed in Germany only. Note on later releases: The name "Turbo C" was not used after version 2.0, because with the release of Turbo C++ 1.0 with 1990, the two products were folded into a single product. That first C++ compiler was developed under contract by a company in San Diego and was one of the first true compilers for C++ (until then, most C++ work was done with precompilers that generated C code). The next version was named Borland C++ to emphasize its flagship status and completely rewritten in-house, with Peter Kukol as the lead engineer. The Turbo C++ name was briefly dropped, eventually reappearing as Turbo C++ 3.0. There was never a 2.0 of the Turbo C++ product series.         1987: Turbo C 1.0 1987: Turbo C 1.1 1988: Turbo C 1.5 1989: Turbo C 2.0 (now with integrated debugger, also for the Atari ST) 1990: Turbo C++ 1.0 1991: Turbo C++ 1.01 1991: Turbo C++ 2.0 1992: Turbo C++ 3.0

From the start, split the product (and later in Pascal) in two lines, one for beginners and one for the professional. At first they were called "Turbo and Turbo Professional, later simply have "Turbo" and "Borland". They developed C++ to 1996 in these two lines next to the version of Turbo C++ 3.0 and Borland C++ 5.0. As with Turbo Pascal, there is also a Turbo C++ for Microsoft windows, which reached version 4.5. Turbo C for the Atari ST, were only made for the versions 1.0, 1.1 and 2.0. The program was not being maintained by Borland, but the sources were sold and then the product under the name PureC developed some time yet. From 1996, which is Delphi principle in C++ toolkit adapted. The Delphi based on C++ is C++ Builder.

Data Types for Turbo C


1. o Turbo C is a compiler and development environment for the programming language C. It came out in 1987 and merged into Turbo C++ in 1990. Turbo C was popular due to its low price, speed and documentation. It became freeware in 2006. Data types identify which kind of information the programmer wants to use. Different data types take varying amounts of memory space and the compiler interprets them in different ways. The fundamental data types of integers, characters, boolean and floating point numbers are all available in Turbo C. 2. Characters o Char is the fundamental character type variable. Turbo C stores it in memory using 1 byte of memory with an integer value from 0-255. An unsigned char can store values from -128 to +127. Use arrays of characters to store multiple character data like words or sentences. Some examples: char m; char n = 'z'; char o[] = { 'e', 'x', 'a', 'm', 'p', 'l', 'e' }; char p[] = "My name "; char q[255]; char r[80] = "example"; char *s = "hi"; unsigned char t; 3. Integers o Use the Int data type to store numerical integer values. Integers are the numbers (..., -3, -2, -1, 0, 1, 2, 3,). Add the modifiers keywords short and long in front of int to make it store a smaller or larger range of values. How much the value

range changes will depend on the specific computer you are using. Add the unsigned keyword in front to make the variable only store positive values. Signed integers include positive and negative values. Some examples: int a; int b = 5; shortint d; unsigned short int e; int f(6); 4. Boolean o Use the bool data type to store values of true or false. This uses 1 byte of memory. Some examples: bool b; bool c = true; cool d = false; 5. Float o Float is the data type that can store non-integer numerical values like 3.145. Double and long double are increasingly bigger versions of the float data type. Float is 4 bytes, double is 8 bytes, and long double is 8 or 12 bytes. Some examples: float m; float n = 6.2; double o = 3456780;

Arithmetic operator
An arithmetic expression is a series of variable names and constants connected by arithmetic operation symbols, namely, addition, subtraction, multiplication and division. During the execution of the object program the actual numerical values stored in variable name are used together with operation symbols to calculate the value of the expression. They are two types of arithmetic operator, they are; Unary and binary. Unary operators used only one operand whereas binary operator required two operand. The operators used for arithmetic operations (i.e. addition, subtraction, multiplication, division) are arithmetic operators. A list of arithmetic operator and their meaning are given below; Operators Meaning + - Addition - - Subtraction * - Multiplication / - Division % - Modulo (remainder of and integer division) Note: while doing division operation the decimal part will be truncated and result is only integer part of quotient. The modulo operator (%) produces the remainder of dividing the first by the second operand. But both the operands must be integer data types. It cannot be used with float or double data types. For example; IF a and b are integer and a=14 and b=4, then a-b=10 a+b=18 a*b=56 a/b=3(decimal point truncated) a%b=2(remainders of an integer division) It can be better understand by following code. #include<stdio.h) #include<conio.h) int main()

{ int a=14 ,b=4; printf(Sum of the two numbers a and be is: %d\n,a+b); printf(Difference of the two numbers a and b is: %d\n,a-b); printf(Product of the two numbers a and b is: %d\n,a*b); printf(Quotient of the two numbers a and b is: %d\n,a/b); printf(Reminder of the two numbers and b is: %d\n,a%b); _getch(); }

Relational Operators
You should have seen these operators before if you've been following these tutorials. I am going to complete the list, so you will have all of Java's relational operators in front of you. Conditional symbols and their meanings Symbol == != > < >= <= Condition is equal to is not equal to is greater than is less than is greater than or equal to is less than or equal to

Relational operators are used primarily in if statements, while loops, and on occasion for loops. There should not be any other cases of their usage. The only addition I made from the previous list is the is not equal to symbol. Here is how it looks like in an if statement:

Now the if statement is true when the variable num is not equal to 3. Otherwise, the condition is true. Because you have seen the rest of the relational operators, I will not go over them here. You can check out how they are used in the conditionals tutorial found in the Java for Beginners section of the site.

Logical Operator
The logical operators compare Boolean expressions and return a Boolean result. The And, Or, AndAlso, OrElse, and Xor operators take two operands, and the Not operator takes a single operand.

The Not operator performs logical negation on a Boolean expression. Put simply, it yields the opposite of the expression it evaluates. If the expression evaluates to True, Notyields False; if the expression evaluates to False, Not yields True. An example is shown below: Dim x As Boolean x = Not 23 > 12 ' x equals False. x = Not 23 > 67 ' x equals True. The And operator performs logical conjunction on two Boolean expressions. That is, if both expressions evaluate to True, then the And operator returns True. If either or both expressions evaluate to False, then And returns False. The Or operator performs logical disjunction on two Boolean expressions. If either expression evaluates to True, Or returns True. If neither expression evaluates to True, Orreturns False. Xor performs logical exclusion on two expressions. If either expression evaluates to True, but not both, Xor returns True. If both expressions evaluate to True or both expressions evaluate to False, Xor returns False. Examples of the And, Or, and Xor operators are shown below: Dim x As Boolean x = 23 > 12 And 12 >4 ' x = True x = 12 > 23 And 12 > 4 ' x = False x = 23 > 12 Or 4 > 12` ' x = True x = 23 > 45 Or 4 > 12 ' x = False x = 23 > 45 Xor 12 > 4 ' x = True x = 23 > 12 Xor 12 > 4 ' x = False x = 12 > 23 Xor 4 > 12 ' x = False Note In addition to being logical operators, Not, Or, And, and Xor also perform bitwise arithmetic when used on numeric values. Information on this functionality can be found at Arithmetic Operators. The AndAlso operator is very similar to the And operator, in that it also performs logical conjunction on two Boolean expressions. The key difference between AndAlso and Andis that AndAlso exhibits short-circuiting behavior. If the first expression in an AndAlso expression evaluates to False, then the second expression is not evaluated and False is returned for the AndAlso expression. Similarly, the OrElse operator performs short-circuiting logical disjunction on two Boolean expressions. If the first expression in an OrElse expression evaluates to True, then the second expression is not evaluated and True is returned for the OrElse expression. Below are some examples that illustrate the difference between And, Or, and their counterparts: 12 > 45 And MyFunction(4) ' MyFunction() is called. 12 > 45 AndAlsoMyFunction(4) ' MyFunction() is not called. 45 > 12 Or MyFunction(4) ' MyFunction is called. 45 > 12 OrElseMyFunction(4) ' MyFunction is not called In the first example, MyFunction() is called, even though 12 > 45 returns False, because And does not short circuit. In the second example, MyFunction is not called, because 12 > 45 returns False, so AndAlso short circuits the second expression. In the third example, MyFunction is called, even though 45 > 12 returns True, because Or does not short circuit. In the fourth example, MyFunction is not called because 45 > 12 returns True, so OrElse short circuits the second expression. Note Although And and Or support bitwise operations with numeric values, AndAlso and OrElse do not.

Assignment Operators (C++)


From Wikipedia, the free encyclopedia In the C++ programming language, the assignment operator, '=', is the operator used for assignment. Like most other operators in C++, it can be overloaded.

The copy assignment operator, often just called the "assignment operator", is a special case of assignment operator where the source (right-hand side) and destination (left-hand side) are of the same class type. It is one of the special member functions, which means that a default version of it is generated automatically by the compiler if the programmer does not declare one. The default version performs a memberwise copy, where each member is copied by its own copy assignment operator (which may also be programmer-declared or compiler-generated). The copy assignment operator differs from the copy constructor in that it must clean up the data members of the assignment's target (and correctly handle self-assignment) whereas the copy constructor assigns values to uninitialized data members.[1] For example: My_Array first;// initialization by default constructor My_Arraysecond(first);// initialization by copy constructor My_Array third = first;// Also initialization by copy constructor second= third;// assignment by copy assignment operator

Overloading copy assignment operator


When deep copies of objects have to be made, exception safety should be taken into consideration. One way to achieve this when resource deallocation never fails is: 1. Acquire new resources 2. Release old resources 3. Assign the new resources' handles to the object classMy_Array { int* array; int count; public: My_Array& operator=(constMy_Array& other) { if(this!=&other)// protect against invalid self-assignment { // 1: allocate new memory and copy the elements int*new_array=newint[other.count]; std::copy(other.array, other.array+other.count, new_array); // 2: deallocate old memory delete[] array; // 3: assign the new memory to the object array=new_array; count=other.count; } // by convention, always return *this return*this; } ... }; However, if a no-fail (no-throw) swap function is available for all the member subobjects and the class provides a copy constructor and destructor (which it should do according to the rule of three), the most straightforward way to implement copy assignment is as follows [2]: public: void swap(My_Array& other)// the swap member function (should never fail!) { // swap all the members (and base subobject, if applicable) with other std::swap(array, other.array); std::swap(count, other.count);

} My_Array& operator =(My_Array other)// note: argument passed by value! { // swap this with other swap(other); // by convention, always return *this return*this; // other is destroyed, releasing the memory } The reason why operator = returns My_Array& instead of void is to allow chained assignments like the following: array_1 = array_2 = array_3;// array_3 is assigned to array_2 // and then array_2 is assigned to array_1 The operator returns a non-const My_Array& to allow chained assignments: array_1 =(array_2 = array_3);// The assignment operator (=) has right-to-left associativity // array_3 is assigned to array_2 // and then array_2 is assigned to array_1 Run Turbo C Fullscreen Mode in Windows 7 There are many ways , to Run Turbo C in fullscreen mode through DOS Box or Xp Mode for : Windows XP Mode is only available in Windows 7 Enterprise, Windows 7Professional, and Windows 7 Ultimate. Here is the simplest trick to Run Turbo C Fullscreen Mode in all versions of Windows 7 : When you try to run Turbo C in Windows 7, you might get following error message

The dialog box that appears when u run TC in Win7 We are forced to compromise with small screen else we need to opt for NetBeansIDE,or DOS Box ..etc methods.

Run TurboC in Small Screen in windows7 What if i say we can run Turbo C in windows 7 Fullscreenmode Yeah, really u can tun Turbo C in FullScreen mode in SAFE MODE of Windows 7

And here we go

Running TurboCFullscreen in windows 7

Computer Assignment Turbo C++

Property of: Jerome GabuterGacu