How do you declare a string?

Below is the basic syntax for declaring a string. char str_name[size]; In the above syntax str_name is any name given to the string variable and size is used to define the length of the string, i.e the number of characters strings will store.

Sizin İçin Seçtik  What is the difference between string and StringBuffer?

Leave a Reply

Your email address will not be published. Required fields are marked *

How do you declare a string?

Below is the basic syntax for declaring a string. char str_name[size]; In the above syntax str_name is any name given to the string variable and size is used to define the length of the string, i.e the number of characters strings will store.

Sizin İçin Seçtik  What is an example of casting in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *