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
-
5.3 Draw.aspx Web Applications I am just about to finish this tutorial. I have given you a couple of code samples to chew on, but t...
-
SQL Management Studio comes in two flavours: 1. SQL Management Studio This edition comes with all versions of SQL Server 2005 except SQL Ser...
-
5.1 The .NET Framework: Big Picture Figure 5‑1 The .NET Framework in Context Looking at Figure 5‑1 we see the lifespan of managed c...
-
4.3 Using the FCL “Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.” The IO strea...
-
2.1 Intermediate Language, Metadata and JIT Compilation Managed code is not interpreted by the CLR. I mentioned that earlier. But ...
-
5.2 .NET Application Scenarios Managed code can be used to develop a variety of different kinds of software. First, it is worth men...
-
Learning about Events (Continue) Lets program the Form_Load event. "MsgBox" is Visual Basic command that launch a message box. for...
-
1.1 Code in a Highly Distributed World Software that addresses the Internet must be able to communicate. However, the Internet is n...
-
4.2 The Framework Class Library Now that you have a taste of the goals and groundwork laid by the CLR and managed code, let’s taste ...
-
Namespaces Namespaces allow to group entities like classes, objects and functions under a name. This way the global scope can be divided in ...
No comments:
Post a Comment