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
-
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...
-
The SQL JOIN clause is used whenever we have to select data from 2 or more tables. To be able to use SQL JOIN clause to extract data from 2 ...
-
SQL is short for Structured Query Language and is a widely used database language, providing means of data manipulation (store, retrieve, up...
-
The SQL MIN aggregate function allows us to select the lowest (minimum) value for a certain column. The SQL MIN function syntax is very simp...
-
The SQL SUM aggregate function allows selecting the total for a numeric column. The SQL SUM syntax is displayed below: SELECT SUM(Column1) F...
-
So far we’ve learnt how to select data from a database table and how to insert and update data into a database table. Now it’s time to learn...
-
IT professionals and students from all over the world have many options for SQL training nowadays. They can learn SQL by going to instructo...
-
The SQL GROUP BY statement is used along with the SQL aggregate functions like SUM to provide means of grouping the result dataset by certai...
-
We will use the Customers table to illustrate the SQL LIKE clause usage: FirstName LastName Email DOB Phone John Smith John.Smith@yaho...
-
The SQL WHERE clause is used to select data conditionally, by adding it to already existing SQL SELECT query. We are going to use the Custom...
No comments:
Post a Comment