vsnprintf will try size of 5 n is: 68 double size from to 10 vsnprintf will try size of 10 n is: 68 double size from to 20 vsnprintf will try size of 20 n is: 68 double size from to 40 vsnprintf will try size of 40 n is: 68 double size from to 80 vsnprintf will try size of 80 n is: 68 vsnprintf successful print with size = 80 and return n= 68 the value=[a really long string is coming here and we want to see what happens!] vsnprintf will try size of 5 n is: 68 double size from to 10 vsnprintf will try size of 10 n is: 6 vsnprintf successful print with size = 10 and return n= 6 the value=[(null)]