Study of console i/o - 3 Study of field width to restrict input.

#include <stdio.h>

int main(void)
{
char msg[10];

printf("Enter a string : ");
scanf("%s", msg);
// scanf("%7s", msg);

printf("\n%s", msg);

return 0;
}

No comments:

Post a Comment

kiss on google ads if you are anonymous because your ip is trackable.thank you.

......from.admin