You can use multiple conversion specifiers in a single printf() function - C Data Type

C examples for Data Type:Introduction

Description

You can use multiple conversion specifiers in a single printf() function

Demo Code

#include <stdio.h>

int main()/*from  w ww  .j ava2  s .c o  m*/
{
    char firstInitial, middleInitial, lastInitial; 
    
    firstInitial = 'M'; 
    
    middleInitial = 'A'; 
    
    lastInitial = 'V'; 
    
    printf("My Initials are %c.%c.%c.", firstInitial, middleInitial, lastInitial); 
    return 0;
}

Result


Related Tutorials