Check out example codes for "c++ write string". It will help you in understanding the concepts better.

Code Example 1

#include <iostream>

int main() {
	std::cout << "Hello" << std::endl; //endl = end line/new line
    // or
    printf("hello");
    
}

Learn ReactJs, React Native from akashmittal.com