Program to Illustrate “string” function

#include<stdio.h>
#include<conio.h>
void main()
{
int roll;
char name[30];
clrscr();
printf("\nEnter Roll No." );
scanf("%d",&roll);
printf("\nEnter Name");
scanf("%s",&name);
printf("\n\n");
printf("\n%s",name);
printf("\n%d",roll);
getch();
}

Leave a Reply