Posted by : Anonymous Wednesday, 23 January 2013

Topic is as follows:

How C++ can play an important role as a base language in order to understand the modern programming languages such as C#, Java, J# etc?

Solution




Generally, C# and Java can be just as fast or faster because the JIT compiler -- a compiler that compiles your IL the first time it's executed -- can make optimizations that a C++ compiled program cannot because it can query the machine. It can determine if the machine is Intel or AMD; Pentium 4, Core Solo, or Core Duo; or if supports SSE4, etc.
A C++ program has to be compiled beforehand usually with mixed optimizations so that it runs decently well on all machines, but is not optimized as much as it could be for a single configuration (i.e. processor, instruction set, other hardware).
Additionally certain language features allow the compiler in C# and Java to make assumptions about your code that allows it to optimize certain parts away that just aren't safe for the C/C++ compiler to do. When you have access to pointers there's a lot of optimizations that just aren't safe.
Also Java and C# can do heap allocations more efficiently than C++ because the layer of abstraction between the garbage collector and your code allows it to do all of its heap compression at once (a fairly expensive operation).
Now I can't speak for Java on this next point, but I know that C# for example will actually remove methods and method calls when it knows the body of the method is empty. And it will use this kind of logic throughout your code.

Solution 2

 Idea Solution
C++ is a statically, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features.
C++ is one of the most popular programming languages and is implemented on a wide variety of hardware and operating system platforms. As an efficient compiler to native code, its application domains include systems software, application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games. Several groups provide both free and proprietary C++ compiler software, including the GNU Project, Microsoft, Intel and Embarcadero technologies. C++ has greatly influenced many other popular programming languages, most notably C# and Java and J# etc. In other words they are modified and simplified versions of C++ according to particular needs. As these languages barrow basic structure, libraries, operators, classes structure, syntax etc from C++ that's why C++ can play an important role as a base language in order to understand the modern programming languages such as C#, Java, J# etc.

Solution3


According to my point of view C++ play an important role as a base of other languages.Because if a bigness want to start C# or others languages then he can do easily if he done C++because he have Idea and concept that how he can learn and use other languages for his purposes.And I think so that If programer knows about C++ it can play an important role.And can give  enhance and more creativity in other languages

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © virtual university of pakistan - Skyblue - Powered by Blogger - Designed by Johanes Djogan -