C Program to Add Two Numbers

Here’s a simple C program that prints a message on the screen:

					#include <stdio.h>

int main() {
    printf("Welcome to GTU Practical!\n");
    return 0;

C Program to Print a Message on the Screen
  • Explanation:

    • The program starts by including the stdio.h header file, which provides the necessary functions for input and output operations in C.
    • The main function is the entry point of the program and is where the execution begins.
    • Inside the main function, we use the printf function to print the message “Hello, world!” to the screen.
    • The \n is the escape sequence for a newline character, which moves the cursor to the next line after printing the message.
    • Finally, the return 0 statement indicates that the program has executed successfully.

    When you compile and run this program, it will display the message “Welcome to GTU Practical!” on the screen.