In this C Program, you will learn how to print your own information containing RollNo, Name, Department, and Age on the screen using C programming by taking input from the user in proper variables. A basic program that displays student's own information containing RollNo, Name, Department, and Age on the screen by storing user input values in specific variables.
PROGRAM :
#include<stdio.h>
int main()
{
char stdName[50],stdDept[100];
int stdRoll, stdAge;
printf("Enter Student Name : ");
scanf("%s",stdName);
printf("Enter Student Dept : ");
scanf("%s",stdDept);
printf("Enter Student RollNo : ");
scanf("%d",&stdRoll);
printf("Enter Student Age : ");
scanf("%d",&stdAge);
printf("\nStudent Name : %s\n",stdName);
printf( "Student Age : %d\n",stdAge);
printf("Student RollNo : %d\n",stdRoll);
printf("Student Dept. : %s\n",stdDept);
return 0;
}