Vyoms OneStopTesting.com - Testing EBooks, Tutorials, Articles, Jobs, Training Institutes etc.
OneStopGate.com - Gate EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopMBA.com - MBA EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopIAS.com - IAS EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopSAP.com - SAP EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopGRE.com - of GRE EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
Bookmark and Share Rss Feeds

Is C dead? | Articles | Recent Articles | News Article | Interesting Articles | Technology Articles | Articles On Education | Articles On Corporate | Company Articles | College Articles | Articles on Recession
Sponsored Ads
Hot Jobs
Fresher Jobs
Experienced Jobs
Government Jobs
Walkin Jobs
Placement Section
Company Profiles
Interview Questions
Placement Papers
Resources @ VYOMS
Companies In India
Consultants In India
Colleges In India
Exams In India
Latest Results
Notifications In India
Call Centers In India
Training Institutes In India
Job Communities In India
Courses In India
Jobs by Keyskills
Jobs by Functional Areas
Learn @ VYOMS
GATE Preparation
GRE Preparation
GMAT Preparation
IAS Preparation
SAP Preparation
Testing Preparation
MBA Preparation
News @ VYOMS
Freshers News
Job Articles
Latest News
India News Network
Interview Ebook
Get 30,000+ Interview Questions & Answers in an eBook.
Interview Success Kit - Get Success in Job Interviews
  • 30,000+ Interview Questions
  • Most Questions Answered
  • 5 FREE Bonuses
  • Free Upgrades

VYOMS TOP EMPLOYERS

Wipro Technologies
Tata Consultancy Services
Accenture
IBM
Satyam
Genpact
Cognizant Technologies

Home » Articles » Is C dead?

Is C dead?








Article Posted On Date : Wednesday, May 20, 2009


Is C dead?
Advertisements

                                                         Is C dead?

                            The C language has been the choice for test and measurement applications for years. But with the popularity of object-oriented languages such as C++ and C#, some may wonder if C has a place in tomorrow's test systems. If you do have a significant amount of C code investment, it is important to understand not only the key C programming language strengths and weaknesses but also best practices when integrating C code into applications written in another language.

                         Introduced more than 35 years ago, the C language has been used in test and measurement, embedded systems, and device driver development for decades. Initially created to address code reuse challenges commonly associated with assembly languages, the C programming language was developed to be platform-independent by abstracting the hardware layer. Because C often is only one layer away from the hardware, it generally is accepted that C provides much of the speed and memory efficiency associated with assembly while increasing code portability and decreasing development time.

The Strengths of C

C programming language strengths include the following:

Powerful Low-Level Capability to Optimize Code

Because C often provides direct access to operating-system or hardware-specific function calls, you have a greater ability to control which specific operations and how many operations are performed at the machine level. Optimized compilers and the capability to call assembly code also help you control program size and execution speed.

Highly Portable and an Extensive Set of Code Reuse Tools

You can compile a C program that adheres to a recognized industry standard, like ANSI C, and is hardware- and OS-independent for a wide variety of computer platforms and operating systems with minimal change to its source code. As a result, the language has amassed a sizable programming community and millions of lines of example code and hardware drivers that have been written in C.

General-Purpose and Industry-Specific Development Environments

Many general-purpose C development environments, such as Microsoft Visual Studio, provide additional out-of-the-box functionality, such as database connectivity APIs, in addition to standard C programming language functions. Industry-specific textual development environments like NI LabWindows/CVI also offer functionality commonly used in vertical application areas including extensive analysis libraries such as signal ramps, filters, and PID control algorithms as well as support for a diverse set of I/O device drivers.

With the capabilities to perform direct hardware manipulation, easily control how data is stored in memory, and reuse millions of lines of preexisting textual math code, the C language is well suited for developing applications with strict space and performance requirements or applications involving extensive signal processing and analysis. Specifically, device drivers, embedded systems, and real-time applications can benefit from the increased speed and processing available in C if the code is written efficiently.

The Challenges of C

C programming language challenges include the following:

Object-Oriented Programming

With complex applications, there usually is a requirement to group data together as a structure. This is a standard feature in most high-level languages including ANSI C.

As an extension, object-oriented languages offer support not only for creating custom data types but also for defining specific methods that work on that data. In particular, object-oriented programming features the concept of organizing an application into distinct modular components called objects. Programmers can encapsulate real-world test hardware, such as data acquisition devices and instruments, as objects.

Software objects model real-world entities, and like real-world objects, each software object is defined by a state and behavior. The state of the object is the set of variables you would use when describing the object. Likewise, objects have certain unique behaviors or actions they are capable of performing. As a result, once you create an object, you have a new data type on which distinct operations can be performed.

For example, a test station may be responsible for testing multiple components on a circuit board. In software, you can organize your application to model this behavior. You can create a class to represent a component and a method that is part of the class to test the component. You then can create a class to represent the circuit board, which is made up of an array of components. To test your board, you simply call the method responsible for testing each of the components that make up a board.

In addition to the base functionality of C, C++ contains some language extensions that make object-oriented programming more convenient. While C emphasizes simplicity, efficiency, and speed, C++ focuses more on abstraction. C++ does not force object-oriented design but allows for it if you deem it feasible. You can implement object-oriented programming in C as well but C++ makes it simpler and less error-prone.

Memory Management

With the low-level memory access available in C comes the responsibility for handling memory allocations and deallocations. Lack of clean-up code that explicitly deallocates memory can significantly influence the performance and determinism of an application. Along with other languages, .NET languages handle many low-level tasks such as memory management. You can allocate new memory on demand and then rely on the garbage collector to dispose of the memory when you no longer need it.

Parallel Execution

Multithreading was a key advance in the history of textual languages. With the capability to virtually execute multiple function calls at once, you can create rich user interfaces that seamlessly perform file I/O, database logging, and hardware control without seeing a performance decrease.

Reusing Existing C Code

There are many ways to integrate existing C code in external programming languages. The most common include the following:

Directly Compile and Link C Source Files

Most C++ compilers support directly calling C code from a C++ source file. First, you must ensure that the C and C++ compilers define basic types such as int, float, or pointer in the same way. The C++ language provides a linkage specification with which you declare that a function or object follows the program linkage conventions for a supported language. The extern keyword indicates to the C++ compiler that the following declaration is a C function.

Call Precompiled C DLLs

You also can create C code in a dynamic link library (DLL) and then call it from other languages that support DLLs. A DLL contains code and data that can be used by more than one program at the same time. For example, calling a DLL from .NET requires Platform Invoke (P/Invoke) to call unmanaged code from the managed world.

To reuse C functions, you need to wrap them with DllImport in C# or Declare Function in Visual Basic .NET and then ensure that all the .NET data types match the data types in the DLL. For example, character arrays become strings, C pointers become IntPtr, and so on.

Although most, if not all, automated test applications require access to hardware, the managed world of .NET isolates you from the underlying hardware. The runtime engine of the .NET Framework, called the Common Language Runtime (CLR), acts as a buffer between your application and the actual memory on the host computer, preventing direct access to memory and registers.

To control devices such as GPIB boards, serial ports, and data acquisition devices, your program still needs direct memory access. This is a situation where using a C device driver in a .NET environment would be ideal. The C code would run in the low-level kernel mode of your OS and not in the user mode to which .NET applications are restricted.

Systems that allow engineers to select the best software tool for the job and integrate diverse code modules and technologies into one solution help maintain legacy code relevance while enabling development teams to take advantage of the latest software platforms. Implementing highly modular and interoperable systems leads to decreased cycle time, cross-functional support teams, and reusable components whether or not the components are developed in C or other common programming languages.

The Bright Future of C

The C programming language has enduring value especially for test applications because of its direct access to memory and minimal software over-head--important aspects lacking from most modern .NET applications. In addition, C gives developers the freedom to write code for a large number of platforms: everything from microcontrollers to advanced process control systems. With the limited number of language restrictions and the capability to develop diverse applications, C is convenient and effective for many test and measurement tasks, giving test engineers one more reason to keep their C/C++ skills sharpened.

 

 

 

 

 

 

 

 

 






Sponsored Ads



Interview Questions
HR Interview Questions
Testing Interview Questions
SAP Interview Questions
Business Intelligence Interview Questions
Call Center Interview Questions

Databases

Clipper Interview Questions
DBA Interview Questions
Firebird Interview Questions
Hierarchical Interview Questions
Informix Interview Questions
Microsoft Access Interview Questions
MS SqlServer Interview Questions
MYSQL Interview Questions
Network Interview Questions
Object Relational Interview Questions
PL/SQL Interview Questions
PostgreSQL Interview Questions
Progress Interview Questions
Relational Interview Questions
SQL Interview Questions
SQL Server Interview Questions
Stored Procedures Interview Questions
Sybase Interview Questions
Teradata Interview Questions

Microsof Technologies

.Net Database Interview Questions
.Net Deployement Interview Questions
ADO.NET Interview Questions
ADO.NET 2.0 Interview Questions
Architecture Interview Questions
ASP Interview Questions
ASP.NET Interview Questions
ASP.NET 2.0 Interview Questions
C# Interview Questions
Csharp Interview Questions
DataGrid Interview Questions
DotNet Interview Questions
Microsoft Basics Interview Questions
Microsoft.NET Interview Questions
Microsoft.NET 2.0 Interview Questions
Share Point Interview Questions
Silverlight Interview Questions
VB.NET Interview Questions
VC++ Interview Questions
Visual Basic Interview Questions

Java / J2EE

Applet Interview Questions
Core Java Interview Questions
Eclipse Interview Questions
EJB Interview Questions
Hibernate Interview Questions
J2ME Interview Questions
J2SE Interview Questions
Java Interview Questions
Java Beans Interview Questions
Java Patterns Interview Questions
Java Security Interview Questions
Java Swing Interview Questions
JBOSS Interview Questions
JDBC Interview Questions
JMS Interview Questions
JSF Interview Questions
JSP Interview Questions
RMI Interview Questions
Servlet Interview Questions
Socket Programming Interview Questions
Springs Interview Questions
Struts Interview Questions
Web Sphere Interview Questions

Programming Languages

C Interview Questions
C++ Interview Questions
CGI Interview Questions
Delphi Interview Questions
Fortran Interview Questions
ILU Interview Questions
LISP Interview Questions
Pascal Interview Questions
Perl Interview Questions
PHP Interview Questions
Ruby Interview Questions
Signature Interview Questions
UML Interview Questions
VBA Interview Questions
Windows Interview Questions
Mainframe Interview Questions


Copyright © 2001-2025 Vyoms.com. All Rights Reserved. Home | About Us | Advertise With Vyoms.com | Jobs | Contact Us | Feedback | Link to Us | Privacy Policy | Terms & Conditions
Placement Papers | Get Your Free Website | IAS Preparation | C++ Interview Questions | C Interview Questions | Report a Bug | Romantic Shayari | CAT 2025

Fresher Jobs | Experienced Jobs | Government Jobs | Walkin Jobs | Company Profiles | Interview Questions | Placement Papers | Companies In India | Consultants In India | Colleges In India | Exams In India | Latest Results | Notifications In India | Call Centers In India | Training Institutes In India | Job Communities In India | Courses In India | Jobs by Keyskills | Jobs by Functional Areas

Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

Gate Articles | Gate Books | Gate Colleges | Gate Downloads | Gate Faqs | Gate Jobs | Gate News | Gate Sample Papers | Gate Training Institutes

MBA Articles | MBA Books | MBA Case Studies | MBA Business Schools | MBA Current Affairs | MBA Downloads | MBA Events | MBA Notifications | MBA FAQs | MBA Jobs
MBA Job Consultants | MBA News | MBA Results | MBA Courses | MBA Sample Papers | MBA Interview Questions | MBA Training Institutes

GRE Articles | GRE Books | GRE Colleges | GRE Downloads | GRE Events | GRE FAQs | GRE News | GRE Training Institutes | GRE Sample Papers

IAS Articles | IAS Books | IAS Current Affairs | IAS Downloads | IAS Events | IAS FAQs | IAS News | IAS Notifications | IAS UPSC Jobs | IAS Previous Question Papers
IAS Results | IAS Sample Papers | IAS Interview Questions | IAS Training Institutes | IAS Toppers Interview

SAP Articles | SAP Books | SAP Certifications | SAP Companies | SAP Study Materials | SAP Events | SAP FAQs | SAP Jobs | SAP Job Consultants
SAP Links | SAP News | SAP Sample Papers | SAP Interview Questions | SAP Training Institutes |


Copyright ©2001-2025 Vyoms.com, All Rights Reserved.
Disclaimer: VYOMS.com has taken all reasonable steps to ensure that information on this site is authentic. Applicants are advised to research bonafides of advertisers independently. VYOMS.com shall not have any responsibility in this regard.