WAP to take one structure name is student that contain rollno, name and age. Take input from user and display output.

Defination :: WAP to take one structure name is student that contain rollno, name and age. Take input from user and display output.

Source Code::

#include<stdio.h>
#include<conio.h>
struct student
{
    int no;
    char na[10];
    int age;
}s;

void main()
{
    clrscr();
    printf("enter any rollno,name,age\n");
    scanf("%d%s%d",&s.no,s.na,&s.age);
    printf("\nrollno:%d\nname:%s\nage:%d",s.no,s.na,s.age);
    getch();
}
WAP to take one structure name is student that contain rollno, name and age. Take input from user and display output. WAP to take one structure name is student that contain rollno, name and age. Take input from user and display output. Reviewed by Unknown on 21:26 Rating: 5

No comments:

Powered by Blogger.