what is the use of %, $ , # in C language. we know that %d is for int %s 4 string. why is the % specially used. why not # $ etc. any explanation for this…..
Those are all called format specifiers. Suppose you want to print formatted output you will use those you listed. For example we use % to specify integer, string or float formats. You can also specify number with % stating how you want to print. Similarly # are mostly used for date format also used as place-holders. Check for specifier in the internet, you will get more useful information than what I am telling here...
Strange question; that's the syntax, you just have to get on with it. But there's nothing magic about a %. It could equally well have been # or $ or anything else. K&R just picked %.