Call us at 0700-922-6559 or Click here

Write a Program to display your name in C language

Below is the program to display your name.

#include <stdio.h>

int main()


    // print name

    printf(“Codrity Technologies”);

    return 0;


Output –

Codrity Technologies

Here’s a step-by-step explanation of the code:

  1. The first line #include <stdio.h> is a preprocessor directive that tells the compiler to include the standard input-output library, which provides functions for input and output operations.
  2. The main() function is the starting point of the program. It returns an integer value, which is used to indicate the success or failure of the program execution.
  3. Inside the main() function, we use the printf() function to display the message “Codrity Technologies [YOUR NAME]” on the screen.
  4. Finally, the return 0; statement is used to exit the program and return a value of 0 to indicate successful execution.

Once you have written the code, you can compile and run it using a C compiler, such as GCC, on your computer. The program will then display your name on the screen when executed.

To learn more about C Programming join our course.

Leave a Reply

Your email address will not be published. Required fields are marked *