How do you declare a variable that will hold string values?

Short Answer
Views 4576

Answer:

The char keyword can only hold 1 character value at a time. By creating an array of characters, you can store string values in it. Example: "char MyName[50]; " declares a string variable named MyName that can hold a maximum of 50 characters.

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of C Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.