4. WHERE IS C PROGRAMMING LANGUAGE USED OR USES OF C LANGUAGE?
C language is used to develop system applications that forms major portion of operating systems such as Windows, UNIX and Linux. Operating systems, C compiler and all UNIX application programs are written in C language. Below are some examples of uses of C language.
Operating system development
Compilers and Assemblers
5. WHAT IS THE DIFFERENCE BETWEEN C AND C++?
Even though C and C++ programming languages are belonging to middle level languages, both are differed in below.
C is structure/procedure oriented programming language whereas C++ is object oriented programming language.
C language program design is top down approach whereas C++ is using bottom up approach.
Polymorphism, virtual function, inheritance, Operator overloading, namespace concepts are not available in C programming language. Whereas C++ language supports all these concepts and features.
C language gives importance to functions rather than data. Whereas C++ gives importance to data rather than functions.
So, data and function mapping is difficult in C. But, data and function mapping is simple in C++ that can be done using objects.
C language does not support user define data types. Whereas C++ supports user define data types.
Exception handling is not present in C programming language. Whereas exception handling is present in C++ language.
C language allows data to freely flow around the functions. But, data and functions are bound together in C++ which does not allow data to freely flow around the functions.
6. WHAT IS THE DIFFERENCE BETWEEN TOP DOWN APPROACH AND BOTTOM UP APPROACH IN PROGRAMMING LANGUAGES?
Top down approach and bottom up approach are involved in software development. These approaches are not involved in program execution.
Structure/procedure oriented programming languages like C programming language follows top down approach. Whereas object oriented programming languages like C++ and Java programming language follows bottom up approach.
Top down approach begins with high level design and ends with low level design or development. Whereas, bottom up approach begins with low level design or development and ends with high level design.
In top down approach, main() function is written first and all sub functions are called from main function. Then, sub functions are written based on the requirement. Whereas, in bottom up approach, code is developed for modules and then these modules are integrated with main() function.
Now-a-days, both approaches are combined together and followed in modern software design.