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

#Padovan string, #A Padovan string P(n) for a natural number n is defined a...

#A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of

Decode the code, Smugglers are becoming very smart day by day. Now they hav...

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Program of conversion between objects of different classes, Conversion betw...

Conversion between Objects of Different Classes As the compiler does not know anything about the user-defined type, the conversion instructions are to be specified in a functio

Padovan string., #question.A Padovan string P(n) for a natural number n is ...

#question.A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a s

Flow chart, given number is prime or not

given number is prime or not

Explain default arguments, Default Arguments A default argument is a va...

Default Arguments A default argument is a value that is automatically assigned to a formal variable, if the actual argument from the function call is omitted. e.g. void

Strings, write a c program to find input string using strlen(), strcpy(), s...

write a c program to find input string using strlen(), strcpy(), strcat(),strncat(), strcmp().

Array, how to use nested loop of for in array

how to use nested loop of for in array

C#, 1. write a program named InputMethodDemo2 that eliminates the repetitiv...

1. write a program named InputMethodDemo2 that eliminates the repetitive code in the InputMethod() in the InputMethodDemo program. Rewrite the program so the InputMethod()contains

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