This is a C Program to print a semicolon without using a semicolon anywhere in the code.
Problem Description
This program prints a semicolon without using a semicolon anywhere in the code.
Problem Solution
1. Print the ASCII value of semicolon and exit.
Program/Source Code
Here is source code of the C Program to print a semicolon without using a semicolon anywhere in the code. The C program is successfully compiled and run on a Linux system. The program output is also shown below.
/*
* C Program to Print a Semicolon without using a Semicolon
* anywhere in the code
*/
#include <stdio.h>
int main(void)
{
//59 is the ascii value of semicolumn
if (printf("%c ", 59))
{
}
return 0;
}
Program Explanation
1. The ASCII value of semicolon is 59.
2. Print this ASCII value and exit.
advertisement
advertisement
Runtime Test Cases
;
Sanfoundry Global Education & Learning Series – 1000 C Programs.
Here’s the list of Best Books in C Programming, Data-Structures and Algorithms
Participate in C Programming Certification Contest of the Month Now!
If you wish to look at other example programs on Simple C Programs, go to Simple C Programs. If you wish to look at programming examples on all topics, go to C Programming Examples.
Next Steps:
- Get Free Certificate of Merit in C Programming
- Participate in C Programming Certification Contest
- Become a Top Ranker in C Programming
- Take C Programming Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Related Posts:
- Buy C Books
- Buy Computer Science Books
- Apply for Computer Science Internship
- Apply for C Internship
- Watch Advanced C Programming Videos