E-learning

Computer-Based Training (CBT) or Internet-Based Training (IBT) or Web-Based Training (WBT) courses at BengalStudents website

How Long Is a String?

Submitted by Publisher on Sun, 03/10/2013 - 00:42

How Long Is a String?

Sometimes, you need to know how many bytes are taken by a string. In C, you can use a function called strlen() to measure the length of a string.
The strlen() Function

Let's have a look at the syntax of the strlen() function.

Declaring Strings

Submitted by Publisher on Sun, 03/10/2013 - 00:40

Declaring Strings

This section teaches you how to declare and initialize strings, as well as the difference between string constants and character constants. First, let's review the definition of a string.

 

Unsized Arrays

Submitted by Publisher on Sun, 03/10/2013 - 00:10

Unsized Arrays

As you've seen, the size of a dimension is normally given during the declaration of an array. It means that you have to count each element in an array. It could be tedious to do so, though, especially if there are many elements in an array.