Hello World in C*

Hello World in C* Featured Image

Welcome back to yet another installment in the Hello World in Every Language series. Today, we’re fortunate to have another community submission—this time from MuhammadOpens in a new tab.. Thanks to them, we’re able to cover Hello World in C*, an object-oriented superset of C which first appeared in 1987.

Table of Contents

C* Background

According to WikipediaOpens in a new tab., C* is a language that was originally designed as an alternative to *Lisp and CM-FORTRAN. Beyond that, there’s really not much documentation. In fact, if you drop down below, you’ll see that I don’t even know how to run C*.

That said, I did manage to dig up the user guide for C*Opens in a new tab. if you want to play around with that. If you have any additional documentation, let me know in the comments.

Hello World in C*

At long last, here’s Hello World in C*:

#include <stdio.h>
main ()
{
    printf("Hello, World!")
}

As we can see, Hello World in C* looks alarmingly similar to C. That said, C* is a superset of C, so this shouldn’t be too much of a surprise. At any rate, let’s dig in.

Up first, we have the include statement which pulls in the stdio header. With the standard IO header included, we’re able to write to standard output using printf.

Next, we have our usual main function declaration which serves as the drop in function for our program. We should be used to seeing this convention since it’s common in the popular industrial languages like C++ and Java.

Finally, we make a call to printf which is a special print function that allows for string formatting. Of course, all we’re going to pass to it is the “Hello, World!” string. And, that’s it!

How to Run the Solution

Unfortunately, I haven’t found a way to execute C* programs. That said, I did find a handful of open-source C* compilers, so maybe those can help us out:

In addition, the user guideOpens in a new tab. does detail how to compile and run C* programs. But, again, that information isn’t super helpful without the compiler.

If you know of an official compiler, let me know in the comments.

Sample Programs in Every Language

Well, that’s it for Hello World in C*. If you liked this article, don’t forget to give it a share. And, if you’re interested in contributing, check out the Sample Programs repositoryOpens in a new tab..

Thanks for stopping by and a special thanks to MuhammadOpens in a new tab. for sharing the solution. Every little bit helps grow the series, so thanks again. Until next time!

Sample Programs in Every Language (44 Articles)—Series Navigation

For 100 Days of Code, I’ve decided to implement a few sample programs in as many languages as possible. Each implementation details a brief history of the language and a description of the code.

The plan for the series is to explore the major general-purpose language like Java, Python, C, C++, and C#. From there, we’ll take a look at some sample programs in web development languages like Ruby, PHP, and JavaScript. As we continue, we’ll cover proprietary languages like Swift and Objective-C. Eventually, we’ll start to tackle less popular languages like Rust, x86, and Verilog. Finally, we’ll play around with some of the esoteric languages like Brainf*ck and LOLCODE.

Who knows? Maybe the Sample Programs in Every Language series will become so popular it’ll never end. To help this series grow, consider sharing it on social media with your friends. Or, if you have a language you want to see, drop your suggestion in the comments.

← Previous Post: [#35] [#37]: Next Post →

Jeremy Grifski

Jeremy grew up in a small town where he enjoyed playing soccer and video games, practicing taekwondo, and trading Pokémon cards. Once out of the nest, he pursued a Bachelors in Computer Engineering with a minor in Game Design. After college, he spent about two years writing software for a major engineering company. Then, he earned a master's in Computer Science and Engineering. Today, he pursues a PhD in Engineering Education in order to ultimately land a teaching gig. In his spare time, Jeremy enjoys spending time with his wife, playing Overwatch and Phantasy Star Online 2, practicing trombone, watching Penguins hockey, and traveling the world.

Recent Posts