Strings In Data Structures

  • This declares a string named name which can hold strings from length 0 to length 19.
  • All strings must end with a null character. When a string is enclosed in double quotes, i.e. “Hello there”, a null character is automatically inserted.
  • The double quotes mean “the string is whatever is inside the quotes followed by a null character.”
  1. char pet[5] = { ‘l’, ‘a’, ‘m’, ‘b’, ‘\0’ } ;




2nd Year CSE UnderGraduate

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Core concept of API and CGI

Managing compliance the Serverless way with AWS Config custom rules

Create your first equity portfolio with Python

3.0.0 — Release notes

Language Stack Installation for Python & Go

How to use Cypress with LaunchDarkly

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Megha Agarwal

Megha Agarwal

2nd Year CSE UnderGraduate

More from Medium


From a Production Engineer into a Data guy

API Testing I