#include <stdio.h> int main(void) { printf("Hello World!\n"); return 0; }
xlc hello.c -o hello
/opt/ibmcmp/vacpp/8.0/bin/xlc hello.c -o hello
./hello
The result should be "Hello World!".
echo $?
The result should be 0.
#include <iostream> int main() { std::cout << "Hello World!" << std::endl; return 0; }
Compile the program:
xlC hello.cpp -o hello
/opt/ibmcmp/vacpp/8.0/bin/xlC hello.cpp -o hello
./hello
The result should be "Hello World!".
echo $?
The result should be "0".