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
Add a function for saving the text stored in an array to a file. Your program must check whether or not the output file already exists, and if it does, your program must ask the us

C++ Multiplayer Game Programming Project Project Description: We are seeking an experienced C++ Game Programmer to enhance clientside related aspects of MCS: Mars City Securi

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.     #include float start

Explain Processing A Data File? Mainly data file applications needs that a data file be altered as it is being processed. For instance in an application involving the processin

Write a Program for Calculating Value of an Integer? For a clear understanding of recursive function we shall see an illustration for calculating value of an integer. main() {

replace character into string and return value of string that are replaced

I need help with virtual memory manager implementation in C

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Implement, in rPeANUt, the a Fibonacci function by using the simple recursive approach. The Fibonacci function can be implemented in c as follow: int fib(int x) {   if (x

I need help with a c# program. Do yall help with c sharp