Program To Show The Use Of scanf() Function
scanf() functiion
/* program to use scanf() function */ #include<stdio.h> #include<conio.h> int main () { clrscr(); char ch; char str[100]; printf("Enter any character \n"); scanf("%c", &ch); printf("Entered character is %c \n",ch); printf("Enter the any string (upto 50 character)\n"); scanf("%s",&str); printf("Entered String is %s",str); getch(); return 0; // main function ends here...... }