Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

c++
coding puzzle
brain tease
programming puzzle
communitycreator

Print a semicolon in C++ without using the semicolon character

sobia

Task

Write a C++ code in the code playground below that prints a semicolon in the output window:

;

However, it should be done without using the semicolon character anywhere inside the program.

A slight hint is already incorporated in the code.

#include <iostream>
using namespace std;
# define SEMICOLON 59 // ASCII value of semicolon

int main() {
  // your code goes here
}

RELATED TAGS

c++
coding puzzle
brain tease
programming puzzle
communitycreator
RELATED COURSES

View all Courses

Keep Exploring