Logo 
Search:

C Programming Articles

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

Program to assign a character variables to the pointer and to display the contents of the pointer

Posted By: Lacey Hughes     Category: C Programming     Views: 3493

Write a program in C to assign a character variables to the pointer and to display the contents of the pointer.

Code for Program to assign a character variables to the pointer and to display the contents of the pointer in C Programming

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



Lacey Hughes
Lacey Hughes author of Program to assign a character variables to the pointer and to display the contents of the pointer 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!