Skip to content
Related Articles

Related Articles

Improve Article

C program to print characters without using format specifiers

  • Last Updated : 29 Oct, 2017

As we know that there are various format specifiers in C like %d, %f, %c etc, to help us print characters or other data types. We normally use these specifiers along with the printf() function to print any variables. But there is also a way to print characters specifically without the use of %c format specifier. This can be obtained by using the below-shown method to get the character value of any ASCII codes of any particular character.

// Prints characters without format specifiers
#include <stdio.h>
int main()
    printf("\x47 \n");
    printf("\x45 \n");
    printf("\x45 \n");
    printf("\x4b \n");
    return 0;



This article is contributed by Chinmoy Lenka. If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.
My Personal Notes arrow_drop_up
Recommended Articles
Page :