Argument index specification in C programming language



 Argument index specification in C programming language

Learn C - C tutorial - Argument index specification in C programming language - C examples - C programs

Argument index specification in C programming language

  • To specify the argument indexing with format secifier in printf statement in c programming language.

Sample Code

#include <stdio.h>
int main()
{
    int a,b,c;
    a=45; 
    b=34; 
    c=57;
    printf("%d,%d,%d\n",a,b,c);
    printf("%3$d,%2$d,%1$d\n",a,b,c);
    return 0;
}

Output

45,34,57
57,34,45


View More Quick Examples


Related Searches to Argument index specification in C programming language