pointer inside structure in c

Solutions on MaxInterview for pointer inside structure in c by the best coders in the world

showing results for - "pointer inside structure in c"
Selma
16 Jul 2016
1#include<stdio.h>
2
3struct Student
4{
5   int  *ptr;  //Stores address of integer Variable 
6   char *name; //Stores address of Character String
7}s1;
8
9int main() 
10{
11
12int roll = 20;
13s1.ptr   = &roll;
14s1.name  = "Pritesh";
15
16printf("\nRoll Number of Student : %d",*s1.ptr);
17printf("\nName of Student        : %s",s1.name);
18
19return(0);
20}
21
queries leading to this page
pointer to structure in c examplepointers inside structures in cdeclare structure pointer in cstruct pointer in cpointer for structure in cusing pointer in function chow to declare struct pointer in cstruct and pointer in cusing pointers and structs in cc program how to use struct with pointercreate structure pointer in cpointer and structure in caccess pointer inside struct in cstruct in c pointerc struct and function pointerc pointer of struct inside structpointer to structure in cpointer to a struct in cdo structures contain pointersstring operations using pointers in cpointer to pointer struct in cunderstanding struct pointer in cpointers inside struct cfreeing pointer in cfunction pointer in struct caccess an int inside a struct pointer in chow to use struct pointer in cpointer using structure in cc define pointer to structc pointer inside of structstruct pointer example in chow to create structure pointer in cwhy do we use structure pointer in cstruct and pointers in cstruct with pointers in cdeclare struct in c as pointerfunction pointer inside struct cc create struct pointerpointer of pointer in struct cpointer struct in cc use pointer of structhow to declare structure pointer in cpointer of function in c inside structstruct pointer variable in cstruct with pointer in caccess a pointer to struct inside a struct in chow to receive a pointer from a structure in chow to create pointer with struct in cways to create structure pointer in cpointer to a structure in a structure in cpointer inside structure cpointers to structure in cstruct pointers in cc struct with pointer to itselfstructure and pointers in chow to set a pointer to a structure in cfunction pointer c in structc declare a pointer to a structpointer for struct in cdeclare struct in c pointerhow to access structure inside structure in c using pointerpointer to structures in cpointer to a structure in chow to make a struct pointer in cstruct and pointers chow to access structure pointer in cwhat is the need of pointers for structure in c c fouction pointer in structurehow to create a pointer to a structure in cpointer of struct c define a pointer of struct in chow to use struct pointers in cwhat is pointer to structure in cpointers in structures in cpointers and structures in cpointer to structure variable in cstructure pointer in cpointer of structure in cc pointer in structc program what is struct with pointerpointer on 2a 2astruct caccessing structure to a structure in c using pointerspointer of a structure in cpointer function to a struct in cpointer values in struct cpointers in structs creturn pointer to structure from a function in chow to create a structure pointer in cstruct as pointer in cpointer in structure in cpointer in struct ccreate a pointer to a struct in cuse pointer inside struct cpointer inside structure in c