Sunday, March 18, 2012

Program To take character from the user by array .

//To take character from the user by array .
#include<stdio.h>
#include<conio.h>
main()
{     int i;
      char a[5];
      printf("Enter the name ");
      for(i=0;i<=4;i++)
      scanf("%c",&a[i]);
      printf("Your name is ");
      for(i=0;i<=4;i++)
      printf("%c",a[i]);
      getch();
      }

No comments:

Post a Comment