Developer community
0 votes
What is the return value from printf() function?
asked by Sr Member (4k points) 5 11 21 | 1k views

1 Answer

0 votes
printf function always returns the number of characters printed. Let us understand this with an example:

    int a=10;
    printf("%d",printf("%d %d %d", a,a,a));

In this above program the inner printf is first called which prints value of a, three times with space between each value, 10 10 10. Total 5 characters get printed (3 value of 10 and 2 spaces).
answered by Advisor (5.6k points) 1 7 14

Related questions

+1 vote
2 answers
+1 vote
2 answers
+1 vote
1 answer
asked by anonymous | 106 views
+1 vote
1 answer
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers


10.7k users

3,751 questions
4,046 answers
10,709 users