Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » BeginnersRSS Feeds

Illustration of conversion specification%[] for strings

Posted By: Alexander Evans     Category: C Programming     Views: 1952

Illustration of conversion specification%[] for strings.

Code for Illustration of conversion specification%[] for strings in C Programming

   main()                                                      
   {                                                           
       char address[80];                                       
                                                               
       printf("Enter address\n");                              
       scanf("%[^\n]", address);                             
       printf("%-80s", address);                               
   }
                                                      
Output 
   Enter address                                               
   New Delhi 110 002                                                     
   New Delhi 110 002                                                         
  
Share: 


Didn't find what you were looking for? Find more on Illustration of conversion specification%[] for strings Or get search suggestion and latest updates.

Alexander Evans
Alexander Evans author of Illustration of conversion specification%[] for strings is from London, United Kingdom.
 
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!