Pointer to string or pointer of string.

A pointer variable which stores memory address of 1st element or base address of character array (string), is called pointer of string or pointer to string.
एक करैक्टर प्रकार का पॉइंटर वेरिएबल जो करैक्टर अरे या स्ट्रींग के प्रथम एलिमेंट का एड्रेस रखता है, पॉइंटर ऑफ़ स्ट्रींग कहलाता है।    

Syntax :-
char array _ name [ size ], * ptr _ name; 
ptr _ name = array _ name;

program for pointer to string or pointer of string :- 

#include<stdio.h>
#include<conio.h>
void main(){
char name[20];*p;
clrscr(); 
printf("enter name of a student\n");
gets(name);
p=&name;
printf("Name of Student is =%s",*p);
getch(); 
}

Comments

Popular posts from this blog

C Language Topics in Hindi and English

C language IMP Questions for BSc/BA/BCom/BCA/BE/BTech/MSc/MCA (CS/IT) I year students