Pages

Friday, 21 December 2018

C Program used to scan a string without using %s format specifier in scanf statement

// program to scan a string without using %s format specifier in scanf statement
#include<stdio.h>
#define pf printf
#define sf scanf
void main()
 {
    char name[20];    
    pf("\nenter any string ");
    sf("%[^\n]s",name);
    pf("\nentered name is %s",name);
}






output:

No comments:

Post a Comment

Programs in turboc3 : Files

File Handling in C File Handling concept in C language is used for store a data permanently in computer. Using this concept we can store our...