My Profile

Ahmednagar, Maharashtra, India
I, Das ShrikKrishna J. MCA III IMSCD&R, Ahmednagar.

Sunday, 24 July 2011

Structure-Pointer (DS using C)

#include<stdio.h>
#include<conio.h>
#include<process.h>
struct student
{
int roll;
char name[20];
};
typedef struct student st;
void main()
{
st s,*ptr=&s;
printf("Enter roll no");
scanf("%d",&s.roll);
printf("Enter name");
scanf("%s",s.name);
printf("student information");
printf("Roll no:%d",ptr->roll);
printf("Name: %s",ptr->name);
getch();
}

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls