Quantcast
Channel: C
Viewing all articles
Browse latest Browse all 46

Strings in C

$
0
0
Strings are paramount datatype for any real use case scenario. However, in C, there is no basic datatype as ‘string’. A string is understood as a collection set of characters i.e. in programmatic language, an array of characters, which are:
  • Directly assigned in double quotes
  • Terminated by a null character i.e. ‘\0’

Defining strings in C



In C, there are two ways to declare and define a string. Firstly, as an array of characters, where just like any...

Strings in C

Viewing all articles
Browse latest Browse all 46

Trending Articles