Built in Data Types Support in C and C++
Hello Everyone, I am learning C++ programming and working on a freelance project. I want to know which programing language supports built-in data types between C and C++ programming. I checked on interviewbit, C supports built-in data types. C is a basic version of a programming language and supports only primitive, fixed data types but not an idea about C++ Programming. Can anyone suggest me? which is more suitable for small projects?
Re: Built in Data Types Support in C and C++
Your question isn't clear. Both languages have build in datatypes. Neither is a really good choice for small projects.
Re: Built in Data Types Support in C and C++
For the C++ in-built intrinsic types see:
https://en.cppreference.com/w/cpp/language/types
Which language(s) may be suitable for which projects can depend upon the project and existing programming knowledge.
To provide further guidance, some information re the project would be useful.
You mention that you are learning C++. How far have you progressed? C++ is a quite complex language (although originally based upon c) and to be productive can require many, many months of study and practice to become productive and efficient in the language.
Re: Built in Data Types Support in C and C++
If it is a general programming project, it is better to use C++, even if it is a small project. With C++, you have C at the baseline but gain the benefits of a modern language. You get a substantial standard library and support for object orientation, functional programming, and generics.
C natively supports only the primitive data types such as integers, characters, and floating points. The primitives are part of C++ as well, but in addition, you may introduce your own data types thanks to the class and enum concepts. Furthermore, the C++ standard library supplies many advanced data types. It includes dynamic arrays, hash tables, stacks, sets, queues, strings, iterators, complex numbers, tuples, dates, clocks, smart pointers, atomics, mutexes, semaphores, and so on.
As they say, if using C is not obvious, go for C++ :). Using a C++ compiler, you can start with C and then venture into C++ at your own pace.