answersLogoWhite

0

What is generic programming in c?

Updated: 9/22/2023
User Avatar

Wiki User

11y ago

Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What is generic programming in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What does generic programming in c plus plus means?

Generic programming means that the code is generic enough that it compile on any C++ implementation. That is, it has no platform-specific code.


What are the Advantages of c over c plus plus?

There are no advantages of C over C++ as such. Everything you can do in C you can also do in C++. However, by taking advantage of C++ object oriented programming, generic programming and template meta programming as well as C-style coding, you can produce more efficient machine code far more easily and more quickly than with C alone.


What is the use of header file graphics in c plus plus programming?

It has no use in C++ itself, it is only useful in Borland Turbo C++. It provides generic graphics support for Borland Turbo C++ applications.


What types of data used in algorithm?

Whatever data you need. If you need the algorithm to operate with many different types of data, and you are programming in C++, you could use generic programming practices and use templates.


Where is C used?

C is ideally suited to low-level programming, but has been used to write operating system kernels, device drivers, subsystems programming and applications software of all types. C++ now dominates across all these domains as it is capable of producing far more efficient machine code much more easily. However, even C++ programmers will make use of C-style programming in combination with its object-oriented and generic programming paradigms.


How do you export from 3D Studio Max to C Plus Plus?

3D Studio Max is a modelling and rendering package. C++ is a generic programming language. You cannot export from one to the other.


What are the merits of generic programming in C?

The primary advantage of generic programming is to reduce the amount of duplicate code we need to write by hand. Generic programming shifts the burden of responsibility for code duplication onto the compiler. This makes code much easier to maintain because whenever we need to modify an algorithm we can do so in just one place. With duplicate code we have to search for all the duplicates and repeat the changes in each one. If we're not careful we could end up with inconsistencies across the duplicates with no real way of knowing which is the "current" implementation. C is not well-suited to generic programming due to inherent weaknesses within the static type system. To achieve a generic programming style we must rely on macros, but macros are not actually part of the C language so the compiler cannot help us debug our algorithms. Macros are expanded by the preprocessor so the compiler only "sees" the C code that is generated by those macros. C++ is better suited to generic programming through the use of template metaprogramming. Templates are an integral part of the C++ language to the extent that compiler (not the preprocessor) generates code on our behalf. As well as generalising our code, templates also cater for specialisations such that we can provide complete and/or partial specialisations from generalised algorithms.


Who invented the programming language C plus plus?

Bjarne Stroustrup, who began development of the language, originally called C with Classes, in 1978. The name was changed to C++ in 1983. The first generic release appeared in 1985.


What is c and c in computer programming?

C and C++ are both high-level programming languages.


What is meant by CPU Bound in C programming?

CPU Bound means that the thread is not waiting for any external event, such as I/O, the release of a time delay, or another thread. Long running threads such as calculations tend to be CPU Bound.It really has nothing to do with C programming. It is a generic computer term.


Create a spiral in C programming?

create spiral in c programming?


How can you display a circle on computer screen with the help of c plus plus programming language?

You cannot. At least not with generic C++. Graphics are platform-dependent and therefore requires a suitable API and library for your specific platform and its hardware.