Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C Language Standard Collections Where Are They?

Tags:

c

collections

I have committed to learning C now, I'm good with Python/PHP/Bash but I've decided I'm limited by not being fluent in C. However I cannot imagine working in a language without lists and hashes, maybe I'm just jumping a gun, but surely there are 'standard' collection libraries. I do not see any in the GNU standard lib though, any suggestions?

like image 898
flaxeater Avatar asked Mar 23 '10 18:03

flaxeater


People also ask

Are there collections in C?

There are two types of collections available in C#: non-generic collections and generic collections. The System. Collections namespace contains the non-generic collection types and System.

How many standard libraries are there in C?

The ANSI C standard library consists of 24 C header files which can be included into a programmer's project with a single directive. Each header file contains one or more function declarations, data type definitions and macros.

Are there C libraries?

A library in C is a collection of header files, exposed for use by other programs. The library therefore consists of an interface expressed in a . h file (named the "header") and an implementation expressed in a .

What happened if standard library is not present in C?

But in pure C, with no extensions, and the standard library functions removed, you basically can't do anything other than read the command line arguments, do some work, and return a status code from main .

What is the collection of C program?

Answer: C is a high-level structured oriented programming language used for general-purpose programming requirements. Basically, C is a collection of its library functions. It is also flexible to add user-defined functions and include those in the C library.

Where C language is found?

C, computer programming language developed in the early 1970s by American computer scientist Dennis M. Ritchie at Bell Laboratories (formerly AT&T Bell Laboratories).


2 Answers

There is no "standard" set of collection classes for C. Many people simply roll their own as needed.

But of course, there are some libraries filling this gap. For example, glib offers linked lists, hashtables and various kinds of trees.

like image 170
Thomas Avatar answered Oct 20 '22 19:10

Thomas


C is lower level than you're used to. There are no standard collections in C outside of the array.

like image 20
tloach Avatar answered Oct 20 '22 18:10

tloach