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
How are postfix and prefix versions of operator++ () differentiated? A: The postfix version of operator++ () contain a dummy parameter of type int. The prefix version does not c

c++ coding decode the letters from numbers

A palindrome is a string that reads the same from the both the ends. Given a string S convert it to a palindrome by doing character replacement. Your takes is to convert S to palin

#question.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. The area under a curve between two po

HOW TO USE POINTER


Write a ''C'' program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.

A string is said to be "Beautiful"€, if it contains only non repetitive alphabets

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. The area under a curve betw

1) Database: The database needs to be used for persistent storage of cars. For details of what information should be stored in the database, please see the description above. You