top of page

Strings

In C, Strings are not actual strings of words rather they are arrays of characters which can be output in order from [0]-[endOfArr] in order to form a string. Let's make a string which outputs "Noot Noot".

We will first make a character array the size of our desired text. For each part of the array we will sequentially input our data.

Output:

str2.png

Example:

str1.png

Notice how the array starts from zero and how we use the Null Terminator \0 as the last character. When read using the string conversion character %s the array will be printed from its starting point {0} until it finds the Null Terminator.

  • Twitter
  • LinkedIn
  • discord-logo--v2
  • kisspng-github-pages-logo-repository-fork-github-logo-1-magentys-5b69de71b51265

Dragon Eye Intelligence LLC

bottom of page