How To | Take input from user | C-Program
Take input from user by "scanf" statement
"scanf" statement is used to take input from user, for example:
code:
#include<stdio.h>
void main()
{
char a;
printf("what is your name?");
scanf("%c",&a);
printf("your name is %c.",a);
getch();
}
Output:
what is your name?
abc
your name is abc.
Sir,Thank you
ReplyDelete