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.

Comments

Post a Comment

Give your feedback!
DO NOT SPAM !!
NO THIRD PARTY PROMOTIONAL LINK !!!! (else comment will be deleted.)

Popular posts from this blog

TOP 10 PROGRAMMING LANGAUAGES COMMING 2021 | ARTICLE

Write a C-program to swap two number:

Print Fibonacci Series using Recursion | C program :