Brijmohan lal Sahu - Facebook
Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday, November 2, 2014

Program to print Student information using array in C.


Student Information


Code Box
---------------------------------------

/* Program to print Student information */

#include<stdio.h>
#include<conio.h>
void main()
{
int age;
char name[25],city[20],clas[20];
clrscr();

printf("\nEnter name:");
scanf("%s",name);

printf("\nEnter  age:");
scanf("%d",&age);

printf("\nEnter  class:");
scanf("%s",clas);

printf("\nEnter City:");
scanf("%s",city);

printf("\n------------------------------------------");
printf("\n\t Student Information ");
printf("\n\t Name : %s",name);
printf("\n\t Age  : %d",age);
printf("\n\t Class: %s",clas);
printf("\n\t City : %s",city);

printf("\n------------------------------------------");



getch();
}

No comments: