Print Output without using a Semicolon in C, C++

Write a C, C++ program to print output without using a semicolon. It’s an interesting problem as in C, C++ every line is terminated with a semicolon. So, how do we write a program to print output without using a semicolon.

In this tutorial, We solve this problem using a little trick. 

Interview Questions

Programming Objective Question

C Program to Print Output without Using a Semicolon

Let’s solve this problem. In C, C++ you can’t directly write a statement without using a semicolon. But you can use condition to print hello world without using a semicolon. Seems confusing, let’s write a code.

In this program, I have not used a semicolon and we have printed hello world successfully without using any semicolon in our program.

Swap two numbers using call by reference

Subscribe Our Tutorials

Get Latest Updates on Facebook

Swap two numbers using a third variable

C, C++ Programming questions for practice.

C++ Program to Print Output without Using a Semicolon

Program to Print Hello World without using a Semicolon using While Loop

Programming Books

Programming and Data Structure Books on Amazon India

Programming and Data Structure Books on Flipkart

About WebRewrite

I am technology lover who loves to keep updated with latest technology. My interest field is Web Development.
Tagged , , . Bookmark the permalink.

One Response to Print Output without using a Semicolon in C, C++

  1. Rajat says:

    Thanks for this post. This question is asked in my viva exam and this post is really helped me.

Leave a Reply

Your email address will not be published. Required fields are marked *