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
Class Definition The following is the general format of defining a class template: class tag_name                  {                    public  :               // Must

A: Memory that has no pointer pointing to it and there is no method to delete or reuse this memory(object), it causes Memory leak. { Base *b = new base(); } Out of this


write a program to find area of curve y=f(x) between x and x=b,integrate between the limits a and b using c     #include float start_point, /* GL


Objective: Construct a C program that controls the UART, and is capable of displaying strings. Echo characters received on the UART to the LCD screen Outcome: A mess

Define the Modulo Division Operator in c language? The C provides one more arithmetic operator % called as modulo division operator and this operator yields the remainder of an


A virtual function permits derived classes to replace the implementation given by the base class. The compiler makes sure the replacement is always known as whenever the object in