Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to assign the pointer variable to another pointer and display the contents of both pointer variables

Posted By: Hannah Brown     Category: C Programming     Views: 2198

Write a program to assign the pointer variable to another pointer and display the contents of both pointer variables.

Code for Program to assign the pointer variable to another pointer and display the contents of both pointer variables in C Programming

#include <stdio.h>
#include <conio.h>
void main()
{
char *s, **t, str[40];
printf(" enter the text...");
gets(str);
s=str;
t=s;
printf("content of both the pointer are: %s  & %s",s,t);
getch();
}
  
Share: 



Hannah Brown
Hannah Brown author of Program to assign the pointer variable to another pointer and display the contents of both pointer variables is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!