Posts

Showing posts with the label c program

C program Hello world

Helloworld.c, This is a first C program for a learner who is interested in C programming language. The Helloworld program explains basic structure of code in c to the learner. The C program learners are going to understand the following from this program. A C program must have a main function. The main function may have a return type or void. The main function may have commandline argument or not. The C program starts execution from the main function. The printf build-in function prints formatted string or any datatype on computer screen. Helloworld C Program The helloworld c program just prints hello world message on computer screen # include <stdio.h> int main () { printf("\n Hello world C "); return 0; } Helloworld C++ Program The helloworld c++ program just prints hello world message on computer screen # include < iostream > using namespace std ; int main () {...