C program to print character without using format specifiers.
जैसा कि हम जानते हैं कि, printf prints the character or any other type of value by passing format specifiers like % d,% c,% f,% ld, ... को उनके corresponding value को प्रिंट करके भेजता है। लेकिन यहां यह विधि का उपयोग करके हम किसी आस्की कोड के चरित्र मान को प्रिंट कर सकते हैं। इस program में हम format specifier % c का उपयोग किए बिना वर्ण मान मुद्रित करेंगे
Print characters without using format specifier - %c
/*C program to print character without using format specifiers.*/
#include
int main()
{
printf("\x41"); printf("\n");
printf("\x42"); printf("\n");
printf("\x43"); printf("\n");
printf("\x44"); printf("\n");
return 0;
}
output :
A
B
C
No comments:
Post a Comment