Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » BeginnersRSS Feeds

Program that illustrates the function of %[ ] specification

Posted By: Imelda Miller     Category: C Programming     Views: 1519

Program that illustrates the function of %[ ] specification.

Code for Program that illustrates the function of %[ ] specification in C Programming

   main()                                                      
   {                                                           
       char address[80];                                       
       printf("Enter address\n");                              
       scanf("%[a-z’]", address);                          
       printf("%-80s\n\n", address);                           
   }                                                           
Output 
                                                     
   Enter address                                               
   new delhi 110002                                            
   new delhi         
  
Share: 



Imelda Miller
Imelda Miller author of Program that illustrates the function of %[ ] specification is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!