Write a program to illustrate array with strings, C/C++ Programming

Assignment Help:

Write a Program to illustrate Array with Strings?

main()
{
static char name[]="devdas";
int i;
i=0;
while(name[i]!='\0')
{
printf("%c",name[i]);
i=i+1;
}
}

In the 'name' array and the zero th character is'd', the first one is 'e' etc. The loop confirms for the null character to find if the character array is terminated. When it finds one then it jumps out of the loop. The program doesn't rely ahead the length of the string instead it looks for the null character to check whether the array has ended.


Related Discussions:- Write a program to illustrate array with strings

Program to display the greatest common divisor , Many modern cryptography a...

Many modern cryptography algorithms require two numbers that are coprime, or sometimes referred to as relatively prime. Two numbers are coprime if their greatest common divisor is

Should i employ null or 0?, A: In C++, the definition of NULL is 0, thus th...

A: In C++, the definition of NULL is 0, thus there is only an aesthetic difference. I prefer to ignore macros, so I employ 0. Another difficulty with NULL is that people sometimes

Read numbers form user and place them in array, Read numbers form user and ...

Read numbers form user and place them in array: Program is to read a group numbers of numbers form user and place them in array type of float and sort them void sort(floa

Super ASCII String Cost, A string S is said to be "Super ASCII", if it cont...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Develop libcurl xml project, Develop libcurl XML project I have a Projec...

Develop libcurl XML project I have a Project using XML with C++. You will use things like LIbcurl etc....and a XML parser to finish the project. Developer must know how to use X

Describe what is actual arguments, Describe what is actual arguments? -...

Describe what is actual arguments? - When certain functions are created and used to perform an action on some provided values, some values are required to be passed to them. Th

Define and explain flow chart with an example, C Programming and Data Struc...

C Programming and Data Structures 1. Define and explain flow chart with an example. 2. Write an algorithm to print all even numbers in descending order and draw the flowcha

Area under curve, Write a program to find the area under the curve y = f(x)...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd