To write a program to input your Name, Father’s Name, Roll Number, Address, Phone Number and print through the printer follow the following commands.
#include<conio.h>
#include<stdio.h>
void main(void)
{
clrscr();
char nam[25],fnam[25],add[25];
int rollno, phone;
printf(“Enter Your Name: “);
gets(nam);
printf(“Enter Your Father Name: “);
gets(fnanm);
printf(“Enter Your Roll No: “);
scanf(%d”, &rollno);
printf(“Enter Your Address: “);
gets(add);
printf(“Enter Your Phone No: “);
scanf(“%d”, &phone);
fprintf(stdprn, “Name is %s”,nam);
fprintf(stdprn, “Father Name is %s”,fnam);
fprintf(stdprn, “Roll No is %d”,rollno);
fprintf(stdprn, “Address is %s”,add);
fprintf(stdprn, “Phone No is %d”,phone);
fprintf(stdprn, “%c”,12);
getche();
}