Ramblings of a techie

Showing posts with label format specifier. Show all posts
Showing posts with label format specifier. Show all posts

20 December 2010

C - %n format specifier in printf

Well, what does the format specifier %n of printf function do?

Explanation:
Print nothing, but write number of characters successfully written so far into an integer pointer parameter.

Example:

Output:
blah blah
val = 38

Cheers!
Jack
No comments:
Labels: C, C++, format specifier, printf
Older Posts Home
Subscribe to: Posts (Atom)
profile for bragboy at Stack Overflow, Q&A for professional and enthusiast programmers

Blog Archive

  • ▼  2017 (3)
    • ▼  Feb (1)
      • 15-Game in Android
    • ►  Jan (2)
  • ►  2016 (7)
    • ►  Nov (1)
    • ►  Sep (1)
    • ►  Jul (1)
    • ►  Jun (1)
    • ►  May (1)
    • ►  Jan (2)
  • ►  2015 (7)
    • ►  Dec (1)
    • ►  Nov (3)
    • ►  Aug (2)
    • ►  Jun (1)
  • ►  2013 (4)
    • ►  Nov (4)
  • ►  2012 (7)
    • ►  Dec (1)
    • ►  Jul (5)
    • ►  Feb (1)
  • ►  2011 (16)
    • ►  Dec (1)
    • ►  Nov (4)
    • ►  Aug (3)
    • ►  Jul (8)
  • ►  2010 (94)
    • ►  Dec (12)
    • ►  Oct (2)
    • ►  Sep (5)
    • ►  Aug (27)
    • ►  Jul (1)
    • ►  Jun (2)
    • ►  May (8)
    • ►  Apr (8)
    • ►  Mar (1)
    • ►  Feb (16)
    • ►  Jan (12)
  • ►  2009 (4)
    • ►  Nov (1)
    • ►  Jan (3)
  • ►  2008 (7)
    • ►  Mar (1)
    • ►  Feb (6)

Popular Posts

  • Quick way to import a jar in Eclipse
  • Java Program to reverse a Singly Linked List
  • TRIE data structure Part 1: The TRIE ADT in Java
  • TRIE data structure Part 2 : Node and TRIE class in Java
  • Reverse a Singly Linked List Recursively in Java
Simple theme. Theme images by sololos. Powered by Blogger.