

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to print a semicolon(;) without using semicolon in C/C++?
In this tutorial, we will be discussing a program to understand how to print a semicolon(;) without using a semicolon in /C++.
This can be done in two possible ways, either by using the ascii value of semicolon or using user-defined macros for the same.
Example
Using putchar() method
#include <stdio.h> int main(){ //ASCII value of semicolon is equal to 59 if (putchar(59)){ } return 0; }
Output
;
Example
Using Macros :
#include <stdio.h> #define POINT printf("%c",59) int main(){ if (POINT) { } }
Output
;
- Related Questions & Answers
- Print Hello World without semicolon in C++
- C Program to print “Hello World!” without using a semicolon
- C Program to print numbers from 1 to N without using semicolon
- Write a C program to print “ Tutorials Point ” without using a semicolon
- Write a program to print ‘Tutorials Point’ without using a semicolon in C
- How can we run a MySQL statement without termination semicolon?
- Semicolon Conventions in Lua Programming
- When is a semicolon after } mandated in C++ Program?
- What does a semicolon do after a C++ class name?
- How to split a semicolon-separated string to a dictionary in Python?
- Can we use semicolon as a MySQL DEMILITER?
- What will happen if a semicolon is misplaced in JavaScript?
- Do I need to use a semicolon after every function in JavaScript?
- What does the leading semicolon in JavaScript libraries do?
- How to find a specific record from a list of values with semicolon in MySQL?
Advertisements