C program to demonstrate pointer to string, C/C++ Programming

C program to demonstrate Pointer to string:

void main()

{

                int a;

                char str[]="hello how are you?",*ptr_str;

                ptr_str=&str[0];

                a=strlen(str);

                for(int i=0; i

                {

                                printf("%c",*ptr_str);

                                ptr_str++;

                }

}

Output:

748_pointer to string.png

Posted Date: 9/29/2012 7:04:17 AM | Location : United States







Related Discussions:- C program to demonstrate pointer to string, Assignment Help, Ask Question on C program to demonstrate pointer to string, Get Answer, Expert's Help, C program to demonstrate pointer to string Discussions

Write discussion on C program to demonstrate pointer to string
Your posts are moderated
Related Questions

Q:  Tells the operators one can override; which operators should he override? A: Bottom line: don't puzzle your users. Remember the reason of operator overloading: to decreas

what is the function of spanning tree in graph algorithm?

Rahul is a newbie to the programming and while learning the programming language he came to know the following rules: · Each program must start with ''{'' and end with '

I need to create a connection to FIFA Ultimate Team 14, I want to utilize C++ specifically for the reason that that is the language I have the most experience in. There are a co


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 t

When I develop a destructor, do I require to explicitly call the destructors for my member objects?

Explain the Command Line Parameters? The Command line arguments are parameters supplied to a program from the operating system. These arguments are parameters accepted to main

Explain redirection in c++