STRINGS:
The way a group of integers can be stored in an integer array, similarly a group of characters can be stored in a character array.
Character arrays are many a times also called strings.Programmers use character arrays or strings in programming languages to manipulate text such as words and
sentences.
A string constant is alone dimensional array of characters terminated by a null('\0').
Ex:
char name[]={'k','a','m','e','s','h','\0'};
the terminating null('\0') is important,because it is the only way the functions that work with a string can know where the string ends.
In fact, a string not terminated by a '\0' is not really a string,but
merely a collection of characters.
Ex: char name[]="kamesh";
Note that, in this declaration '\0' is not necessary.c inserts the null character automatically.
Popular Posts
-
Files in VB .NET Working with Directories We will work with the File and Directory classes in this section. We will create a directory and c...
-
Please do this exercise at the command line instead of using NetBeans. This is to learn the concept of classpath without the help of NetBean...
-
Now I will show you how to retrieve the data posted from a HTML file in a JSP page. Consider an html page that prompts the user to enter his...
-
Lab exercises and homeworks: * Things to check before you start the lab * Chapter 3 (Class #1, Jan. 16th homework) o Exerc...
-
Polymorphism Polymorphism is one of the crucial features of OOP. It means "one name, multiple forms". It is also called as Overlo...
-
The SQL AVG aggregate function selects the average value for certain table column. Have a look at the SQL AVG syntax: SELECT AVG(Column1) FR...
-
Getting Started Note that all the images in this tutorial taken from Visual Basic version 6.0. If you using other version of Visual Basic, t...
-
Introduction: If you are new to Exception handling, please read "Exception Handling Statements" section of the Java Progamming Tut...
-
Introduction: In this exercise, you are going to build and run a sample Java program called CommandLineusing NetBeans. The sample program c...
-
SQL Server Express is a free, easy to use, redistributable version of SQL Server 2005 designed for building simple data-driven applications....
No comments:
Post a Comment