×

C Programs

C Basic & Conditional Programs

C Looping Programs

C String Programs

C Miscellaneous Programs

C Example for nested 'printf'

In this example, we will learn how to use nested printf statement in C program, how it works and what values will be printed?
Submitted by Shamikh Faraz, on February 25, 2018

Consider the given example:

#include <stdio.h>

int main()
{

    printf("\t%d",printf("includehelp"));

    return (0);

}

Output

includehelp	11

It prints "includehelp 11". Word 'Includehelp' prints, because it is written under printf and but first printf is printing the number of letters counted in the word 'includehelp' i.e., so it is 'includehelp 11'.

C Basic Programs »

Related Programs

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.