- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C program to print characters without using format specifiers
In this article we will see how we can print some characters without using any kind of format specifiers. The format specifiers in C are %d, %f, %c etc.These are used to print characters and numbers in C using the printf() function.
Here we will see another way to print characters without using %c format specifier. This can be done by putting ASCII values directly in hexadecimal form.
Example Code
#include <stdio.h> main () { printf("\x41
"); //41 is ASCII of A in Hex printf("\x52
"); //41 is ASCII of A in Hex printf("\x69
"); //41 is ASCII of A in Hex }
Output
A R i
Advertisements