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

Assignment Help:

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


Related Discussions:- C program to demonstrate pointer to string

How, how to program?

how to program?

Pointers, In this sub-task will you implement three functions for the final...

In this sub-task will you implement three functions for the final three function prototypes that will do exactly the same as the three functions that you have just written. This ti

Function that has two int parameters number , Write a function that has two...

Write a function that has two int parameters num and n, and returns TRUE when the nth bit in num is 1, otherwise FALSE. This function should use the function in the above problem.

Last ant on rod, You are given a collection of words, say as in a dictionar...

You are given a collection of words, say as in a dictionary. You can represent it in the following compressed form: the first word will be followed by a sequence of a pair of numbe

Demonstration using moss open source machine translation, Demonstration usi...

Demonstration using Moss Open Source Machine Translation Project Description: Moses is an open source Statistical Machine Translation System. I need someone to provide me a d

About, How can I learn all programming languages.?

How can I learn all programming languages.?

Create a stack using arrays, Problem : (a) Stacks can be implemented u...

Problem : (a) Stacks can be implemented using arrays. Write down the following C or C++ function to (i) create a stack (ii) add an element to a stack (push). (b) Expl

File IO, I''m trying to write a function that prints the substring if it is...

I''m trying to write a function that prints the substring if it is found in the string, and after it prints it deletes it from the string so i could print the next substring if it

When should i use references, A: Use references when you can use, and use p...

A: Use references when you can use, and use pointers when you have to. References are generally preferred over pointers whenever you don't require "reseating". Usually this mean

C program to demonstrate call by reference, C program to demonstrate call b...

C program to demonstrate call by reference: void disp(int *,int*,int*,int*); void main() {                 int a=2,b=3, sum,mul;                 printf("Enter 1st n

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